Пример #1
0
        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);
        }
Пример #2
0
        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);
        }