Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Errors #43

Open
mrlinds opened this issue Jan 30, 2020 · 2 comments
Open

Import Errors #43

mrlinds opened this issue Jan 30, 2020 · 2 comments

Comments

@mrlinds
Copy link
Contributor

mrlinds commented Jan 30, 2020

When upgrading unity, or opening the project for the first time, tiltbrush models always fail to import properly. After initial import has completed, we then need to reimport all the tiltbrush assets again.
I assume it's an order of import with the models importing before the brush definitions are available.

InvalidOperationException: Cannot find TiltBrushToolkitSettings.asset TiltBrushToolkit.TbtSettings.get_Instance () (at Assets/ThirdParty/TiltBrush/Scripts/TbtSettings.cs:30) TiltBrushToolkit.TbtSettings.get_BrushManifest () (at Assets/ThirdParty/TiltBrush/Scripts/TbtSettings.cs:42) TiltBrushToolkit.ModelImportSettings.GetDescriptorForStroke (System.String oldMaterialName) (at Assets/ThirdParty/TiltBrush/Scripts/Editor/ModelImportSettings.cs:451) TiltBrushToolkit.ModelImportSettings.OnAssignMaterialModel (UnityEngine.Material material, UnityEngine.Renderer renderer) (at Assets/ThirdParty/TiltBrush/Scripts/Editor/ModelImportSettings.cs:228) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0) UnityEditor.AssetPostprocessingInternal.InvokeMethodIfAvailable (System.Object target, System.String methodName, System.Object[] args) (at <6f28216fea9f453abf2e05b770ed3ee4>:0) UnityEditor.AssetPostprocessingInternal.ProcessMeshAssignMaterial (UnityEngine.Renderer renderer, UnityEngine.Material material) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)

@dubois
Copy link
Contributor

dubois commented Jan 30, 2020

Yeah; editor extensions are really supposed to be distributed as dlls. On initial import, the C#, the models, the ScriptableObjects, etc are all getting imported at the same time and Unity doesn't know anything about dependencies. IIRC there are also restrictions on when you can import new assets.

In this case, I am not sure that compiling into a .dll would fix it since it's a dependency from the C# code to a ScriptableObject. It's quite irritating, I agree; and I haven't thought of a reasonable fix.

@DeepChallengerVR
Copy link

DeepChallengerVR commented Dec 19, 2022

Hi, I am running into this issue. Any ideas for work arounds / fixes?

Edit: After better understanding above messages I realize re-importing tiltbrush assets is an ok workaround. If anyone else finds this thread:

  • to make your life easier, in your Unity project keep all of your .glb / tiltbrush files in folders dedicated to tiltbrush files.
  • For this example steps to fix, I assume all of your .glb files are stored in Assets/3dModels/TiltBrush
  • Steps to fix:
  • Copy the contents of Assets/3dModels/TiltBrush to somewhere on your PC outside of your Unity project
  • In Unity, delete the contents of Assets/3dModels/TiltBrush
  • Drag and drop the contents from Windows File Explorer back into Assets/3dModels/TiltBrush
  • You should not see any .meta files changes and your local install of the unity project should not have this issue anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants