26 lines
632 B
C#
26 lines
632 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.Playables;
|
||
|
|
|
||
|
|
[System.Serializable]
|
||
|
|
public class PlayableAssetTest : PlayableAsset
|
||
|
|
{
|
||
|
|
public string testName;
|
||
|
|
public int testInt;
|
||
|
|
public Material _mat;
|
||
|
|
|
||
|
|
// Factory method that generates a playable based on this asset
|
||
|
|
public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
|
||
|
|
{
|
||
|
|
//return Playable.Create(graph);
|
||
|
|
PlayableTest t = new PlayableTest();
|
||
|
|
t.testName = testName;
|
||
|
|
t.testInt = testInt;
|
||
|
|
|
||
|
|
return ScriptPlayable<PlayableTest>.Create(graph, t);
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|