GetInt can only be called from the main thread.

   7076   2   0
User Avatar
Member
3 posts
Joined: July 2013
Offline
Hello,

I'm having some weird errors with any otl that I import in Unity.

the error is:

ArgumentException: GetInt 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.
UnityEditor.EditorPrefs.GetInt (System.String key) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/Utility.gen.cs:864)
HoudiniHost.getBool (System.String name) (at Assets/Houdini/Scripts/HoudiniHost.cs:1115)
HoudiniHost.get_prGenerateUVs () (at Assets/Houdini/Scripts/HoudiniHost.cs:320)
HoudiniAsset.reset () (at Assets/Houdini/Scripts/HoudiniAsset.cs:866)
HoudiniAssetOTL.reset () (at Assets/Houdini/Scripts/HoudiniAssetOTL.cs:67)
HoudiniControl..ctor () (at Assets/Houdini/Scripts/HoudiniControl.cs:78)
HoudiniAsset..ctor ()
HoudiniAssetOTL..ctor ()

Also I had another error while building a project with the spaceship otl inside
the error was pointing out to HoudiniAssetUtility.cs with
HoudiniAssetUtility.cs(1624,28): error CS0246 The type or namespace name `UnwrapParam' could not be found.
however i added
#if UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6
and #endif
at each part that the error was pointing, which did the trick.



Thank you,
User Avatar
Member
402 posts
Joined: March 2013
Offline
This is a bug in the production build that has been fixed some time ago. Please upgrade to the latest nightly version of Houdini to fix this error.
User Avatar
Member
3 posts
Joined: July 2013
Offline
thank you for the response.
  • Quick Links