- Home /
I just deleted the plugins from the hiercahy view , its stpuid but it worked
Not letting me build my game!
I was ready to build my game , but when i did it said this :
ArgumentException: Find can only be called from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. PauseScript
And it has something to do with this line :
var aimscript : AimDownSightsScript = gameObject.Find("AIM").GetComponent(AimDownSightsScript);
I have no clue AT ALL what could be messing it up.
I also have this error here , but with no script reference given ( no line of the code given )
Find can only be called from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
I actaully give up on this , its bugging me because i cant give thr game to my friends and let others play it , i cant get told whats wrong with my game and all that stuff . its really frustrating , PLEASE help me
Additional info : I have a plugin called photon networking , i think it might have something to do with that but im not using it . i get no errors when i save off my code , so that also leaves me clueless.
Don't know JS but try (at top in var declaration) var aimscript : AimDownSightsScript;
then in Start try aimscript = gameObject.Find("AI$$anonymous$$").GetComponent(AimDownSightsScript);
Ok now that problems gone , now there are some VERY odd problems
Error building Player: Extracting referenced dlls failed.
ArgumentException: The Assembly UnityEditor is referenced by ArcLayer$$anonymous$$anager. But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) UnityEditor.HostView:OnGUI()
i have nothing else to say , this is crazy
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
What am I missing? Intellisense says 'ok' Editor runs ok. Build fails!?!?! 1 Answer
Can't make a build using Photon Voice - "plugins colliding with each other" 1 Answer
How can I stop the variable values reverting to its default values after being built? 1 Answer
Native extension for OSXStandalone target not found 4 Answers