Exemplo n.º 1
0
        private static void ImportAnimation(List <AssetItem> assetReferences, UFile localPath, List <string> animationNodes, bool shouldPostFixName, AssetItem skeletonAsset)
        {
            if (animationNodes != null && animationNodes.Count > 0)
            {
                var assetSource = localPath;

                var asset = new AnimationAsset {
                    Source = assetSource
                };
                var animUrl = localPath.GetFileName() + (shouldPostFixName ? " Animation" : "");

                if (skeletonAsset != null)
                {
                    asset.Skeleton = AttachedReferenceManager.CreateProxyObject <Skeleton>(skeletonAsset.Id, skeletonAsset.Location);
                }

                assetReferences.Add(new AssetItem(animUrl, asset));
            }
        }
        private static void ImportAnimation(List<AssetItem> assetReferences, UFile localPath, List<string> animationNodes, bool shouldPostFixName, AssetItem skeletonAsset)
        {
            if (animationNodes != null && animationNodes.Count > 0)
            {
                var assetSource = localPath;

                var asset = new AnimationAsset { Source = assetSource };
                var animUrl = localPath.GetFileName() + (shouldPostFixName ? " Animation" : "");

                if (skeletonAsset != null)
                    asset.Skeleton = AttachedReferenceManager.CreateProxyObject<Skeleton>(skeletonAsset.Id, skeletonAsset.Location);

                assetReferences.Add(new AssetItem(animUrl, asset));
            }
        }