Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Obi Cloth particle editor doesn't work
#14
(24-07-2020, 10:45 PM)Ritstyle Wrote: Ok i think i found the culpit error, when i install Obi cloth it gives this error:

InvalidCastException: Specified cast is not valid.
Obi.ObiActorBlueprintEditor.OnEnable () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:62)
Obi.ObiMeshBasedActorBlueprintEditor.OnEnable () (at Assets/Obi/Editor/Common/Blueprints/ObiMeshBasedActorBlueprintEditor.cs:31)
Obi.ObiClothBlueprintEditor.OnEnable () (at Assets/Obi/Editor/Cloth/Blueprints/ObiClothBlueprintEditor.cs:39)

Line 62 of ObiActorBlueprintEditor does this:
Quote:blueprint = (ObiActorBlueprint)target;

"target" in a Editor class is guaranteed by Unity to be the object/asset being inspected (https://docs.unity3d.com/ScriptReference/Editor.html) and since the editor has a constraint attribute [CustomEditor(typeof(ObiActorBlueprint), true)], target should always be of type ObiActorBlueprint, or a derived class.

Under normal circumstances, this cast should always succeed, and it does in all machines we test on. We haven't had any similar reports from other users. This same pattern of casting the target to the inspected object type is used throughout the samples in Unity's own documentation, as you can see in the link above.

What kind of blueprint are you inspecting? is it one of the included samples? Do you see any other errors apart from this one in the console?
Reply


Messages In This Thread
RE: Obi Cloth particle editor doesn't work - by josemendez - 27-07-2020, 10:13 AM