您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
24 行
489 B
24 行
489 B
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "New PathAnchor", menuName = "Runtime Anchors/Path")]
|
|
public class PathAnchor : RuntimeAnchorBase
|
|
{
|
|
[HideInInspector] public bool isSet = false; // Any script can check if the transform is null before using it, by just checking this bool
|
|
|
|
private PathSO _Path;
|
|
public PathSO Path
|
|
{
|
|
get { return _Path; }
|
|
set
|
|
{
|
|
_Path = value;
|
|
isSet = _Path != null;
|
|
}
|
|
}
|
|
|
|
public void OnDisable()
|
|
{
|
|
_Path = null;
|
|
isSet = false;
|
|
}
|
|
}
|