public static bool InspectorField(EffekseerModelResource res) { EditorGUILayout.LabelField(res.path); var result = EditorGUILayout.ObjectField(res.asset, typeof(EffekseerModelAsset), false) as EffekseerModelAsset; if (result != res.asset) { res.asset = result; return(true); } return(false); }
public static EffekseerModelResource LoadAsset(string dirPath, string resPath) { resPath = Path.ChangeExtension(resPath, ".asset"); EffekseerModelAsset asset = AssetDatabase.LoadAssetAtPath <EffekseerModelAsset>(EffekseerEffectAsset.NormalizeAssetPath(dirPath + "/" + resPath)); var res = new EffekseerModelResource(); res.path = resPath; res.asset = asset; return(res); }