Closed FreakTheMighty closed 1 year ago
With jsb.Editor.UnityBinding enabled, the generated bindings produce
public static ClassDecl Bind(TypeRegister register) { var cls = register.CreateClass("ScriptableObject", typeof(UnityEngine.ScriptableObject), QuickJS.Binding.CommonFix.CrossBindConstructor); cls.AddMethod(true, "CreateInstance", QuickJS.Unity.ScriptableObjectFix.BindStatic_CreateInstance); return cls; }
However, this method ScriptableObjectFix.BindStatic_CreateInstance, is wrapped inside of a #if UNITY_EDITOR, so it fails on build.
ScriptableObjectFix.BindStatic_CreateInstance
#if UNITY_EDITOR
Am I missing something? Is there a way to indicate that the bindings for editor only methods should be skipped or wrapped in their own directives?
ScriptableObjectFix.BindStatic_CreateInstance should be available even if UNITY_EDITOR is not defined. @FreakTheMighty Thanks a lot.
With jsb.Editor.UnityBinding enabled, the generated bindings produce
However, this method
ScriptableObjectFix.BindStatic_CreateInstance
, is wrapped inside of a#if UNITY_EDITOR
, so it fails on build.Am I missing something? Is there a way to indicate that the bindings for editor only methods should be skipped or wrapped in their own directives?