Exemplo n.º 1
0
        private static void HandleMovedAssets(string[] movedAssets, string[] movedFromAssetPaths)
        {
            for (var i = 0; i < movedAssets.Length; i++)
            {
                Utility.DebugLog(string.Format("moved {0} to {1}", movedFromAssetPaths[i], movedAssets[i]));
                var sid = AssetDatabase.AssetPathToGUID(movedAssets[i]);
                if (Utility.IsModelPath(movedAssets[i]))
                {
                    var clipIds = APResources.GetAnimationClipAssetIdInModel(movedAssets[i]);
                    foreach (var id in clipIds)
                    {
                        APCache.MoveTo(sid, movedAssets[i]);
                        var clip = APCache.GetValue(APAssetType.AnimationClip, id);
                        SyncManager.MovedFromAssets.Enqueue(id);
                        SyncManager.MovedToAssets.Enqueue(clip);
                    }
                }

                APCache.MoveTo(sid, movedAssets[i]);
                var asset = APCache.GetValue(sid);
                SyncManager.MovedFromAssets.Enqueue(sid);
                SyncManager.MovedToAssets.Enqueue(asset);
            }
        }