当前位置: 首页>>代码示例>>C#>>正文


C# AstarPath.SetUpReferences方法代码示例

本文整理汇总了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 ();
		}
	}
开发者ID:JustSAT,项目名称:Tower-Defence,代码行数:31,代码来源:AstarPathEditor.cs

示例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 ();
		}
	}
开发者ID:moderndelta137,项目名称:Shadow_Sword,代码行数:33,代码来源:AstarPathEditor.cs

示例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 ();
    }
开发者ID:AlexisHenriquezB,项目名称:SpaceMooney,代码行数:26,代码来源:AstarPathEditor.cs


注:本文中的AstarPath.SetUpReferences方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。