Closed lorenalexm closed 3 years ago
It's because the default property value is undefined, there is no type information for the type matching mechanism to guess a proper overloading member to use.
let oldValue: Vector3 = self[propertyKey] || Vector3.zero; // it should fix this issue
Thank you for finding out this problem. I've pushed a submission to fix it.
Wonderful! Thank you so much @ialex32x. d4490eb should close this issue!
I am attempting to extend the decorators to allow having proper
Vector3
editing within an inspector window, instead of having to have threefloat
properties and constructing my ownVector3
objects from these values in the script.I cannot seem to get around the error
[native] no overload method matched for EditorGUILayout.Vector3Field [2]
though; the complete debug log can be found at bottom. This could be with my unfamiliarity of the unity-jsb code base and not knowing where all additions must be made.I have made changes to the
editor_decorators.ts
,JSInspectorBase.cs
, and theJSScriptProperties.cs
files. Are there more places that I am missing? I have included my changes below, and would greatly appreciate any guidance in moving forward with this. Thank you!