loudixvmuniu/Assets/TimeLine/PlayableAssetTest.cs

26 lines
632 B
C#
Raw Permalink Normal View History

2025-01-19 13:45:40 +08:00
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);
}
}