unity-jsb
unity-jsb copied to clipboard
UNITY_EDITOR conflicting with binding
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.
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?