加载性能优化, 暂时放弃异步加载
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using Convention;
|
||||
using Dreamteck.Splines;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -10,7 +11,9 @@ namespace Demo.Game
|
||||
|
||||
public static SplineNode Make()
|
||||
{
|
||||
return new GameObject("", typeof(Node)).AddComponent<SplineNode>();
|
||||
var node = new GameObject("", typeof(Node)).AddComponent<SplineNode>();
|
||||
node.m_MyNode = node.GetOrAddComponent<Node>();
|
||||
return node;
|
||||
}
|
||||
|
||||
private Node m_MyNode;
|
||||
@@ -21,15 +24,7 @@ namespace Demo.Game
|
||||
public int MyNodeContent = 0;
|
||||
|
||||
|
||||
public Node MyNode
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_MyNode == null)
|
||||
m_MyNode = GetComponent<Node>();
|
||||
return m_MyNode;
|
||||
}
|
||||
}
|
||||
public Node MyNode => m_MyNode;
|
||||
|
||||
public void AddTo(SplineCore core)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user