A* Pathfinding Project
3.6.1
The A* Pathfinding Project for Unity 3D
|
Classes | |
class | UpdateChecker |
Checking for updates on startup. More... | |
Public Member Functions | |
void | AddGraph (System.Type type) |
void | DeserializeGraphs () |
void | DeserializeGraphs (byte[] bytes) |
void | DisableJs () |
Disables JS support if it was enabled. | |
void | DrawOptimizationSettings () |
Draws optimizations settings. | |
void | EnableJs () |
Enables JS support. | |
void | FindGraphTypes () |
Searches in the current assembly for GraphEditor and NavGraph types. | |
void | LoadGraphs () |
void | OnDestroy () |
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 | SaveGraphsAndUndo (EventType et=EventType.Used, string eventCommand="") |
byte[] | SerializeGraphs () |
byte[] | SerializeGraphs (out uint checksum) |
byte[] | SerializeGraphs (Pathfinding.Serialization.SerializeSettings settings, out uint checksum) |
override bool | UseDefaultMargins () |
Tell Unity that we want to use the whole inspector width. | |
Static Public Member Functions | |
static void | EditTags () |
Opens the A* Inspector and shows the section for editing tags. | |
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 | MenuScan () |
static void | RefreshServerMessage () |
static void | UpdateCheckLoop () |
Checking for updates on startup. | |
Public Attributes | |
List< DefineObject > | defines |
Holds defines found in script files, used for optimizations. | |
GraphEditor[] | graphEditors |
List of all graph editors for graphs attached. | |
EditorGUILayoutx | GUILayoutx |
AstarPath | script |
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 | documentationURL = "http://arongranberg.com/astar/docs/" |
URL to the documentation of the A* Pathfinding Project. | |
static GUIStyle | downArrow |
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 Dictionary< NavGraph, KeyValuePair< float, KeyValuePair< int, int > > > | graphNodeCounts |
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 | 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 | topBoxHeaderStyle |
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] |
static System.DateTime | lastUpdateCheck [get, set] |
Private Member Functions | |
int | ByteArrayHash (byte[] arr) |
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 | DrawAboutArea () |
void | DrawColorSettings () |
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 | DrawSerializationSettings () |
void | DrawSettings () |
void | DrawTagSettings () |
void | DrawUserConnections () |
void | DrawUserConnectionsWindow () |
void | GetAstarEditorSettings () |
Reads settings frome EditorPrefs. | |
bool | HandleUndo () |
UndoPropertyModification[] | OnPostProcessModifications (UndoPropertyModification[] mods) |
void | OnUndoRedoPerformed () |
Called when an undo or redo operation has been performed. | |
void | OnWillFlushUndoRecord () |
void | RemoveConnection (UserConnection conn) |
Removes user connection conn from the script.astarData.userConnections array. | |
void | RepaintSceneView () |
Repaints Scene View. | |
TextAsset | SaveGraphData (byte[] bytes, TextAsset target=null) |
void | SerializeIfDataChanged () |
void | SetAstarEditorSettings () |
Static Private Member Functions | |
static bool | CheckForUpdates () |
Checks for updates if there was some time since last check. | |
static void | DiscardFirstRun () |
Discards the first run window. | |
static void | DrawColorSlider (ref float left, ref float right, bool editable) |
static void | ParseServerMessage (string result) |
static void | UpdateCheckCompleted (string result) |
Handles the data from the update page. | |
Private Attributes | |
AstarPath.AstarDistribution | astarDistribution = AstarPath.AstarDistribution.AssetStore |
GraphNode | firstShiftNode |
int | selectedUserConnection = -1 |
bool | showAddGraphMenu = false |
Is the 'Add New Graph' menu open. | |
Static Private Attributes | |
static System.DateTime | _lastUpdateCheck |
static bool | _lastUpdateCheckRead = false |
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 uint | ignoredChecksum = 0 |
static int | lastUndoGroup = -1000 |
static bool | linkSettings = false |
static bool | optimizationSettings = false |
static bool | showSettings = false |
void AddGraph | ( | System.Type | type | ) |
|
private |
|
staticprivate |
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.
|
private |
Make sure every graph has a graph editor.
|
private |
Creates a GraphEditor for a graph.
|
private |
Creates a link between start and end.
void DeserializeGraphs | ( | ) |
void DeserializeGraphs | ( | byte[] | bytes | ) |
void DisableJs | ( | ) |
Disables JS support if it was enabled.
This is done by restructuring folders in the project
|
staticprivate |
Discards the first run window.
It will not be shown for this project again
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
Draws the first run dialog.
Asks if the user wants to enable JS support
|
private |
|
private |
|
private |
Draws the main area in the inspector.
void DrawOptimizationSettings | ( | ) |
Draws optimizations settings.
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
Opens the A* Inspector and shows the section for editing tags.
void EnableJs | ( | ) |
Enables JS support.
This is done by restructuring folders in the project
void FindGraphTypes | ( | ) |
Searches in the current assembly for GraphEditor and NavGraph types.
|
private |
Reads settings frome EditorPrefs.
|
static |
|
static |
|
private |
|
static |
Checks if JS support is enabled.
This is done by checking if the directory 'Assets/AstarPathfindingEditor/Editor' exists
void LoadGraphs | ( | ) |
|
static |
Loads GUISkin and sets up styles.
|
static |
void OnDestroy | ( | ) |
void OnDisable | ( | ) |
Cleans up editor stuff.
void OnDrawGizmos | ( | ) |
Draw Editor Gizmos in graphs.
This is called using a delegate OnDrawGizmosCallback in the AstarPath script.
void OnEnable | ( | ) |
Enables editor stuff.
Loads graphs, reads settings and sets everything up
override void OnInspectorGUI | ( | ) |
|
private |
void OnSceneGUI | ( | ) |
|
private |
Called when an undo or redo operation has been performed.
|
private |
|
staticprivate |
|
static |
|
private |
Removes user connection conn from the script.astarData.userConnections array.
void RemoveGraph | ( | NavGraph | graph | ) |
|
private |
Repaints Scene View.
|
private |
void SaveGraphsAndUndo | ( | EventType | et = EventType.Used , |
string | eventCommand = "" |
||
) |
byte [] SerializeGraphs | ( | ) |
byte [] SerializeGraphs | ( | out uint | checksum | ) |
byte [] SerializeGraphs | ( | Pathfinding.Serialization.SerializeSettings | settings, |
out uint | checksum | ||
) |
|
private |
|
private |
|
staticprivate |
Handles the data from the update page.
|
static |
Checking for updates on startup.
Repeatedly called by #UpdateChecker
override bool UseDefaultMargins | ( | ) |
Tell Unity that we want to use the whole inspector width.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
Alternative path to the editor assets folder for the A* Pathfinding Project.
|
static |
If the dark skin is detected, show a popup asking if the dark skin should be used.
|
private |
|
static |
|
static |
URL to more info about the A* Pathfinding Project.
|
static |
|
static |
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.
|
static |
|
staticprivate |
|
staticprivate |
List<DefineObject> defines |
Holds defines found in script files, used for optimizations.
|
static |
URL to the documentation of the A* Pathfinding Project.
|
static |
|
staticprivate |
|
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
|
staticprivate |
|
staticprivate |
|
static |
|
private |
|
static |
|
static |
GraphEditor [] graphEditors |
List of all graph editors for graphs attached.
|
static |
List of all graph editors available (e.g GridGraphEditor)
|
static |
|
static |
|
static |
EditorGUILayoutx GUILayoutx |
|
static |
True if the user answered No on askForDarkSkin.
|
static |
|
staticprivate |
|
staticprivate |
|
static |
Latest version of the A* Pathfinding Project.
|
static |
Description of the latest update of the A* Pathfinding Project.
|
staticprivate |
|
static |
URL to a page with more info on modifiers.
|
staticprivate |
|
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.
AstarPath script |
|
static |
|
private |
|
static |
|
private |
Is the 'Add New Graph' menu open.
|
static |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
URL to the version file containing the latest version number.
|
static |
Toggle to use a darker skin which matches the Unity Pro dark skin.
|
get |
|
staticgetset |