Do things before all other scripts started
I'm developing a plugin used by multiple unity based game as a license checker. The plan is to check user license before the game started. So i create an empty game object which invoke the license checking method from plugin DLL in Awake(). The question is, how can i block all other game content (scripts) until the license checking process completed? Setting up "Script Execution Order" does not really help blocking all other scripts right?
Thanks for your time.
Answer by Dave-Carlile · Oct 07, 2015 at 12:32 PM
Just create an empty scene that handles the licensing check. Once it succeeds load up the menu scene or whatever the first game scene is.
Thanks for your quick response! I think this is the correct answer.
By the way, what if i want user can see the first game scene but cannot do anything until the license checking completed, is there any way to create such script and can be applied on different unity games without too many painful integration for these game developers?
Thanks again.
It depends on what you mean by "cannot do anything". If it's just a matter of not letting them start a game from the menu then it can be as simple as an if
statement when trying to start the game.
if (LicencesIsValid())
StartTheGame();
else
DisplayInvalidLicense();
Your answer
Follow this Question
Related Questions
Variables being initialized BEFORE Awake ()?? How is it possible? 1 Answer
Card Game Basics 1 Answer
GameObject.GetComponentsInChildren returns twice as much objects than i thought it would 2 Answers
UnityHubSetup not working 0 Answers
How to use App indexing Api's by extending a class with Prime31 's UnityPlayerActivity ? 0 Answers