更新至unity6并且更改Scriptable完成
This commit is contained in:
@@ -13,10 +13,11 @@ namespace Demo.Game
|
||||
return new GameObject().AddComponent<SplineTrackRenderer>();
|
||||
}
|
||||
|
||||
public override IEnumerator LoadScript(string script)
|
||||
protected override IEnumerator DoSomethingDuringApplyScript()
|
||||
{
|
||||
MyLineMaterial = Resources.Load<Material>("Line/Default");
|
||||
yield return base.LoadScript(script);
|
||||
if (MyDefaultMaterial == null)
|
||||
MyDefaultMaterial = StaticCacheDefaultMaterial;
|
||||
yield return base.DoSomethingDuringApplyScript();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user