A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
AstarPathEditor Class Reference
+ Inheritance diagram for AstarPathEditor:
+ Collaboration diagram for AstarPathEditor:

Public Member Functions

void AddGraph (System.Type type)
 
void CheckForUpdates ()
 Checks for updates if there was some time since last check.
 
void CheckGraphEditors (bool forceRebuild=false)
 Make sure every graph has a graph editor.
 
GraphEditor CreateGraphEditor (string graphType)
 Creates a GraphEditor for a graph.
 
int CreateNewUserConnection (Vector3 start, Vector3 end)
 Creates a link between start and end.
 
void DeSerializationInterrupt (AstarSerializer serializer, bool isNewer, System.Guid g1)
 
void DeserializeGraphs ()
 
void DeserializeGraphs (byte[] bytes)
 
void DisableJs ()
 Disables JS support if it was enabled.
 
void DrawAboutArea ()
 
void DrawColorSettings ()
 
void DrawDarkSkinDialog ()
 Draws a dialog asking the user if he/she wants to use a dark skin.
 
void DrawDebugSettings ()
 
void DrawEditorSettings ()
 
void DrawFirstRun ()
 Draws the first run dialog.
 
bool DrawGraph (NavGraph graph, GraphEditor graphEditor)
 
void DrawLinkSettings ()
 
void DrawMainArea ()
 Draws the main area in the inspector.
 
void DrawOptimizationSettings ()
 Draws optimizations settings.
 
void DrawSerializationSettings ()
 
void DrawSettings ()
 
void DrawTagSettings ()
 
void DrawUserConnections ()
 
void DrawUserConnectionsWindow ()
 
void EnableJs ()
 Enables JS support.
 
void FindGraphTypes ()
 Searches in the current assembly for GraphEditor and NavGraph types.
 
void GetAstarEditorSettings ()
 Reads settings frome EditorPrefs.
 
bool HandleUndo ()
 
void LoadGraphs ()
 
void OnDisable ()
 Cleans up editor stuff.
 
void OnDrawGizmos ()
 Draw Editor Gizmos in graphs.
 
void OnEnable ()
 Enables editor stuff.
 
override void OnInspectorGUI ()
 
void OnSceneGUI ()
 
void RemoveGraph (NavGraph graph)
 
void RepaintSceneView ()
 Repaints Scene View.
 
void SaveGraphsAndUndo (EventType et=EventType.Used)
 
byte[] SerializeGraphs ()
 
byte[] SerializeGraphs (out uint checksum)
 
byte[] SerializeGraphs (Pathfinding.Serialization.SerializeSettings settings, out uint checksum)
 
void SetAstarEditorSettings ()
 
void UpdateCheckCompleted (string result)
 Handles the data from the update page.
 

Static Public Member Functions

static void DiscardFirstRun ()
 Discards the first run window.
 
static void EditTags ()
 
static string GetURL (string tag)
 
static string GetURL (string tag, string defaultURL)
 
static bool IsJsEnabled ()
 Checks if JS support is enabled.
 
static bool LoadStyles ()
 Loads GUISkin and sets up styles.
 
static void ParseServerMessage (string result)
 
static UnityEngine.Object ReadUnityReference (AstarSerializer serializer, string name, int instanceID, System.Type type)
 
static void RefreshServerMessage ()
 
static void WriteUnityReference (AstarSerializer serializer, UnityEngine.Object ob)
 

Public Attributes

Dictionary< string, DefineObjectdefines
 Holds defines found in script files, used for optimizations.
 
Node firstShiftNode
 
GraphEditor[] graphEditors
 List of all graph editors for graphs attached.
 
EditorGUILayoutx GUILayoutx
 
System.DateTime lastUpdateCheck = System.DateTime.UtcNow
 
AstarPath script
 
int selectedUserConnection = -1
 

Static Public Attributes

static string alternativeEditorAssets = "Assets/AstarPathfindingEditor/Editor/EditorAssets"
 Alternative path to the editor assets folder for the A* Pathfinding Project.
 
static bool askForDarkSkin = false
 If the dark skin is detected, show a popup asking if the dark skin should be used.
 
static readonly string AstarProButton = "A* Pathfinding Project Pro only feature\nThe Pro version can be bought on the A* Pathfinding Project homepage, click here for info"
 
static string astarProInfoURL = "http://arongranberg.com/unity/a-pathfinding/astarpro/"
 URL to more info about the A* Pathfinding Project.
 
static readonly string AstarProTooltip = "A* Pathfinding Project Pro only feature\nThe Pro version can be bought on the A* Pathfinding Project homepage,"
 
static Dictionary< string, string > astarServerData
 Holds various URLs and text for the editor.
 
static GUISkin astarSkin
 
static string CRecastHelpURL = "http://www.arongranberg.com/astar/docs/class_pathfinding_1_1_recast_graph.php#a2d3655da3ed281674cf5125205e2a246"
 
static string documentationURL = "http://arongranberg.com/astar/docs/"
 URL to the documentation of the A* Pathfinding Project.
 
static GUIStyle downArrow
 
static string DownloadLink = "http://arongranberg.com/unity/a-pathfinding/download"
 
static string editorAssets = "Assets/AstarPathfindingProject/Editor/EditorAssets"
 Path to the editor assets folder for the A* Pathfinding Project.
 
static bool firstRun = true
 
static GUIStyle graphBoxStyle
 
static GUIStyle graphDeleteButtonStyle
 
static Dictionary< string,
CustomGraphEditor
graphEditorTypes = new Dictionary<string,CustomGraphEditor> ()
 List of all graph editors available (e.g GridGraphEditor)
 
static GUIStyle graphGizmoButtonStyle
 
static GUIStyle graphInfoButtonStyle
 
static bool hasForcedNoDarkSkin = false
 True if the user answered No on askForDarkSkin.
 
static GUIStyle helpBox
 
static System.Version latestAstarVersion
 Latest version of the A* Pathfinding Project.
 
static string latestAstarVersionDesc
 Description of the latest update of the A* Pathfinding Project.
 
static string latestAstarVersionURL
 
static string ModifierHelpURL = "http://www.arongranberg.com/astar/docs/modifiers.php"
 URL to a page with more info on modifiers.
 
static bool refreshedServerData = false
 False if astarServerData has not yet been updated with latest data.
 
static string scriptsFolder = "Assets/AstarPathfindingProject"
 
static
Pathfinding.Serialization.SerializeSettings 
serializationSettings = Pathfinding.Serialization.SerializeSettings.All
 
static bool showSerializationSettings = false
 
static bool stylesLoaded = false
 
static GUIStyle thinHelpBox
 
static GUIStyle upArrow
 
static WWW updateCheckObject
 
static double updateCheckRate = 1F
 
static string updateURL = "http://www.arongranberg.com/astar/version.php"
 URL to the version file containing the latest version number.
 
static bool useDarkSkin = false
 Toggle to use a darker skin which matches the Unity Pro dark skin.
 

Properties

System.Type[] graphTypes [get]
 

Private Member Functions

void RemoveConnection (UserConnection conn)
 Removes user connection conn from the script.astarData.userConnections array.
 

Private Attributes

AstarPath.AstarDistribution astarDistribution = AstarPath.AstarDistribution.AssetStore
 
bool showAddGraphMenu = false
 Is the 'Add New Graph' menu open.
 

Static Private Attributes

static bool aboutArea = false
 
static bool colorSettings = false
 
static bool customAreaColorsOpen = false
 
static bool editLinks = false
 
static bool editorSettings = false
 
static bool editTags = false
 
static bool linkSettings = false
 
static bool optimizationSettings = false
 
static bool showSettings = false
 

Member Function Documentation

void CheckForUpdates ( )

Checks for updates if there was some time since last check.

Usually called from OnInspectorGUI. It must be called repeatedly to ensure that the result is processed

+ Here is the call graph for this function:

int CreateNewUserConnection ( Vector3  start,
Vector3  end 
)

Creates a link between start and end.

See Also
AstarData.userConnections
void DisableJs ( )

Disables JS support if it was enabled.

This is done by restructuring folders in the project

static void DiscardFirstRun ( )
static

Discards the first run window.

It will not be shown for this project again

+ Here is the caller graph for this function:

void DrawFirstRun ( )

Draws the first run dialog.

Asks if the user wants to enable JS support

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DrawOptimizationSettings ( )

Draws optimizations settings.

A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here

+ Here is the caller graph for this function:

void EnableJs ( )

Enables JS support.

This is done by restructuring folders in the project

+ Here is the caller graph for this function:

static bool IsJsEnabled ( )
static

Checks if JS support is enabled.

This is done by checking if the directory 'Assets/AstarPathfindingEditor/Editor' exists

+ Here is the caller graph for this function:

static bool LoadStyles ( )
static

Loads GUISkin and sets up styles.

See Also
editorAssets
Returns
True if all styles were found, false if there was an error somewhere

+ Here is the caller graph for this function:

void OnDrawGizmos ( )

Draw Editor Gizmos in graphs.

This is called using a delegate OnDrawGizmosCallback in the AstarPath script.

+ Here is the caller graph for this function:

void OnEnable ( )

Enables editor stuff.

Loads graphs, reads settings and sets everything up

+ Here is the call graph for this function:

void RepaintSceneView ( )

Repaints Scene View.

Warning
Uses Undocumented Unity Calls (should be safe for Unity 3.x though)

+ Here is the caller graph for this function:

Member Data Documentation

string alternativeEditorAssets = "Assets/AstarPathfindingEditor/Editor/EditorAssets"
static

Alternative path to the editor assets folder for the A* Pathfinding Project.

Deprecated:
string astarProInfoURL = "http://arongranberg.com/unity/a-pathfinding/astarpro/"
static

URL to more info about the A* Pathfinding Project.

Deprecated:
Dictionary<string,string> astarServerData
static
Initial value:
= new Dictionary<string, string> {
{"URL:modifiers","http://www.arongranberg.com/astar/docs/modifiers.php"},
{"URL:astarpro","http://arongranberg.com/unity/a-pathfinding/astarpro/"},
{"URL:documentation","http://arongranberg.com/astar/docs/"},
{"URL:findoutmore","http://arongranberg.com/unity/a-pathfinding"},
{"URL:download","http://arongranberg.com/unity/a-pathfinding/download"},
{"URL:cRecastHelp","http://www.arongranberg.com/astar/docs/class_pathfinding_1_1_recast_graph.php#a2d3655da3ed281674cf5125205e2a246"},
{"URL:changelog","http://arongranberg.com/astar/docs/changelog.php"},
{"URL:tags","http://arongranberg.com/astar/docs/tags.php"}
}

Holds various URLs and text for the editor.

This info can be updated when a check for new versions is done to ensure that there are no invalid links.

Dictionary<string,DefineObject> defines

Holds defines found in script files, used for optimizations.

A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here
string documentationURL = "http://arongranberg.com/astar/docs/"
static

URL to the documentation of the A* Pathfinding Project.

Deprecated:
string editorAssets = "Assets/AstarPathfindingProject/Editor/EditorAssets"
static

Path to the editor assets folder for the A* Pathfinding Project.

If this path turns out to be incorrect, the script will try to find the correct path

See Also
LoadStyles
string ModifierHelpURL = "http://www.arongranberg.com/astar/docs/modifiers.php"
static

URL to a page with more info on modifiers.

Deprecated:
bool refreshedServerData = false
static

False if astarServerData has not yet been updated with latest data.

The data is got from the server on system update checks, it is cached in editor prefs.

string updateURL = "http://www.arongranberg.com/astar/version.php"
static

URL to the version file containing the latest version number.

Deprecated:

The documentation for this class was generated from the following file: