edited July 2023 in General Support
Hey, so I have a script where I'm adding a second outline to any Text component that's generated on my GUIBox prefab using New UI and that's working fine. The problem arises when the GUIBox is closed and the Text Component I modified goes into the UIPool and subsequently gets re-parented.

I've tried destroying the UIPoolComponent on my GUIBox prefab and it's parent, and destroying the added outline once my GUIBox is no longer the parent (the latter works, but the rapid pooling that happens when taking damage still makes the outline flash on and off as it's added/removed).

Is there any way for me to make it so that the Text Component or GUI Box as a whole does not go into the UI pool?
Post edited by Xavi on
  • You'll have to change that in code.
    Either change the NewUIPool class to always return null in the GetTextLabel function, or change the UIHelper class to not get it from the pool in the CreateText function.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2023
    I'm having trouble compiling the DLL for the Framework Library. I unzipped the folder and followed the instructions here, I can compile and replace the Core .dll, but i'm getting problems with the Solution recognizing UnityEngine.UI even though I manually added it to the references. Getting the following (Using Visual Studio 2017 Community with Visual Studio Unity tools installed. UnityEngine.UI works fine in the game itself and all my other .slns) image
    Post edited by Xavi on
  • edited July 2023
    Got the above to work by importing the .csproj for Framework into my project's solution and adding the reference to UnityEngine.UI.dll and OrkFrameworkCore.dll from there.
    Post edited by Xavi on
  • edited July 2023
    However now I'm getting this issue when i try to open up the OrkFramework window.
    image
    [Edit fixed the above by changing my project .sln's configuration properties for Framework off of 2017 as importing it there reset it from when I changed that in OrkFramework.sln]

    Is there an easier way to do this? It feels like i'm going through a lot just to add a second outline to the texts in a GUI Box. The script I wrote is having trouble doing this since seeing exactly when ORK adds a new Textbox to my prefab by checking the number of children in Update and/or tracking changes via OnTransformChildrenChanged() is inconsistent
    Post edited by Xavi on
  • Actually, the latest ORK 2 source projects already come set up ready to compile. You just need to unzip it, open it in Visual Studio, select the target (usually Unity_2018 for anything 2018 and newer) and you're good to go.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.