Beispiel #1
0
        public void addAnimator2SO(SOAnimatorController soAnimator)
        {
            string assetsImagePath          = ExportUtil.convFullPath2AssetsPath(m_fullPath);
            RuntimeAnimatorController asset = AtlasPrefabUtil.loadAllAsset <RuntimeAnimatorController>(assetsImagePath);

            soAnimator.addAnimator(m_subPathNoExt, asset);
        }
Beispiel #2
0
        // 打包 Controller
        public void exportControllerAsset()
        {
            foreach (var item in m_controllerList)
            {
                //m_curXmlAnimatorController = item;
                RuntimeAnimatorController runtimeAsset = ExportAnimatorControllerUtil.BuildAnimationController(item);
                SOAnimatorController      soAnimator   = ScriptableObject.CreateInstance <SOAnimatorController>();
                soAnimator.addAnimator(item.controllerFullPath, runtimeAsset);

                // 创建预制,并且添加到编辑器中,以便进行检查
                AssetDatabase.CreateAsset(soAnimator, item.assetFullPath);
                //刷新编辑器
                AssetDatabase.Refresh();
            }
        }