Quantcast
Channel: Answers for "GameObject instantiation in C# static constructor"
Browsing all 4 articles
Browse latest View live

Answer by dmg0600

You can use classes as always as long as you don't mix Unity-specific calls with threads as most of them (Instantiate, Coroutines, etc) must be called from the main thread. What you are trying to...

View Article


Answer by frarees

You can do that at editor time using things like [InitializeOnLoad][1]. Not sure if you can do that at runtime.. It needs somehow to get triggered by an instance on the scene. You could use...

View Article


Answer by dmg0600

You can use classes as always as long as you don't mix Unity-specific calls with threads as most of them (Instantiate, Coroutines, etc) must be called from the main thread. What you are trying to...

View Article

Answer by frarees

You can do that at editor time using things like [InitializeOnLoad][1]. Not sure if you can do that at runtime.. It needs somehow to get triggered by an instance on the scene. You could use...

View Article
Browsing all 4 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>