本文整理汇总了C#中AstarPath.SetUpReferences方法的典型用法代码示例。如果您正苦于以下问题:C# AstarPath.SetUpReferences方法的具体用法?C# AstarPath.SetUpReferences怎么用?C# AstarPath.SetUpReferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AstarPath
的用法示例。
在下文中一共展示了AstarPath.SetUpReferences方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnEnable
//End Misc
/** Enables editor stuff. Loads graphs, reads settings and sets everything up */
public void OnEnable () {
script = target as AstarPath;
GUILayoutx = new EditorGUILayoutx ();
EditorGUILayoutx.editor = this;
AstarSerializer.readUnityReference_Editor = ReadUnityReference;
AstarSerializer.writeUnityReference_Editor = WriteUnityReference;
//Enables the editor to get a callback on OnDrawGizmos to enable graph editors to draw gizmos
script.OnDrawGizmosCallback = OnDrawGizmos;
// Make sure all references are set up to avoid NullReferenceExceptions
script.SetUpReferences ();
//Search the assembly for graph types and graph editors
FindGraphTypes ();
GetAstarEditorSettings ();
LoadStyles ();
//Load graphs only when not playing, or in extreme cases, when astarData.graphs is null
if ((!Application.isPlaying && (script.astarData == null || script.astarData.graphs == null || script.astarData.graphs.Length == 0)) || script.astarData.graphs == null) {
LoadGraphs ();
}
}
示例2: OnEnable
//End Misc
/** Enables editor stuff. Loads graphs, reads settings and sets everything up */
public void OnEnable () {
script = target as AstarPath;
GUILayoutx = new EditorGUILayoutx ();
EditorGUILayoutx.editor = this;
//Enables the editor to get a callback on OnDrawGizmos to enable graph editors to draw gizmos
script.OnDrawGizmosCallback = OnDrawGizmos;
// Make sure all references are set up to avoid NullReferenceExceptions
script.SetUpReferences ();
//Search the assembly for graph types and graph editors
if ( graphEditorTypes == null || graphEditorTypes.Count == 0 )
FindGraphTypes ();
try {
GetAstarEditorSettings ();
} catch (System.Exception e) {
Debug.LogException ( e );
}
LoadStyles ();
//Load graphs only when not playing, or in extreme cases, when astarData.graphs is null
if ((!Application.isPlaying && (script.astarData == null || script.astarData.graphs == null || script.astarData.graphs.Length == 0)) || script.astarData.graphs == null) {
LoadGraphs ();
}
}
示例3: OnEnable
//End Misc
/** Enables editor stuff. Loads graphs, reads settings and sets everything up */
public void OnEnable()
{
script = target as AstarPath;
GUILayoutx = new EditorGUILayoutx ();
EditorGUILayoutx.editor = this;
AstarSerializer.readUnityReference_Editor = ReadUnityReference;
AstarSerializer.writeUnityReference_Editor = WriteUnityReference;
//Enables the editor to get a callback on OnDrawGizmos to enable graph editors to draw gizmos
script.OnDrawGizmosCallback = OnDrawGizmos;
// Make sure all references are set up to avoid NullReferenceExceptions
script.SetUpReferences ();
//Search the assembly for graph types and graph editors
FindGraphTypes ();
GetAstarEditorSettings ();
LoadStyles ();
LoadGraphs ();
}