Esempio n. 1
0
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <AlembicShotPlayable> .Create(graph);

            var behaviour = playable.GetBehaviour();

            m_stream = StreamPlayer.Resolve(graph.GetResolver());
            behaviour.streamPlayer = m_stream;
            return(playable);
        }
Esempio n. 2
0
        static void ProcessAlembicStreamPlayerAssets(AlembicStreamPlayer streamPlayer, string streamingAssetsPath)
        {
            streamPlayer.StreamDescriptor = Object.Instantiate(streamPlayer.StreamDescriptor);// make a copy
            var srcPath = streamPlayer.StreamDescriptor.PathToAbc;

            // Avoid name collisions by hashing the full path
            var hashedFilename = HashSha1(srcPath) + ".abc";
            var dstPath        = Path.Combine(streamingAssetsPath, hashedFilename);

            AlembicBuildPostProcess.FilesToCopy.Add(new KeyValuePair <string, string>(srcPath, dstPath));

            streamPlayer.StreamDescriptor.PathToAbc = hashedFilename;
        }
Esempio n. 3
0
 void Start()
 {
     _alembic = gameObject.GetComponent <AlembicStreamPlayer>();
 }