Manually updated AStarPath & removed unsafe update checks

This commit is contained in:
MarcUs7 2024-12-28 11:52:28 +01:00
parent 9166515c50
commit 11fbaabb0b
2 changed files with 8 additions and 6 deletions

View file

@ -948,7 +948,7 @@ namespace Pathfinding {
/// <summary>Opens the A* Inspector and shows the section for editing tags</summary> /// <summary>Opens the A* Inspector and shows the section for editing tags</summary>
public static void EditTags () { public static void EditTags () {
AstarPath astar = GameObject.FindObjectOfType<AstarPath>(); AstarPath astar = Object.FindFirstObjectByType<AstarPath>();
if (astar != null) { if (astar != null) {
editTags = true; editTags = true;
@ -1365,7 +1365,7 @@ namespace Pathfinding {
[MenuItem("Edit/Pathfinding/Scan All Graphs %&s")] [MenuItem("Edit/Pathfinding/Scan All Graphs %&s")]
public static void MenuScan () { public static void MenuScan () {
if (AstarPath.active == null) { if (AstarPath.active == null) {
AstarPath.active = FindObjectOfType<AstarPath>(); AstarPath.active = Object.FindFirstObjectByType<AstarPath>();
if (AstarPath.active == null) { if (AstarPath.active == null) {
return; return;
} }

View file

@ -107,9 +107,11 @@ namespace Pathfinding {
}; };
static AstarUpdateChecker() { static AstarUpdateChecker() {
// Don't check for updates (already deprecated). Commented out to avoid warnings
// Add a callback so that we can parse the message when it has been downloaded // Add a callback so that we can parse the message when it has been downloaded
EditorApplication.update += UpdateCheckLoop; //EditorApplication.update += UpdateCheckLoop;
EditorBase.getDocumentationURL = () => GetURL("documentation"); //EditorBase.getDocumentationURL = () => GetURL("documentation");
} }
@ -189,7 +191,7 @@ namespace Pathfinding {
} }
static void DownloadVersionInfo () { static void DownloadVersionInfo () {
var script = AstarPath.active != null ? AstarPath.active : GameObject.FindObjectOfType(typeof(AstarPath)) as AstarPath; var script = AstarPath.active != null ? AstarPath.active : Object.FindFirstObjectByType<AstarPath>();
if (script != null) { if (script != null) {
script.ConfigureReferencesInternal(); script.ConfigureReferencesInternal();
@ -198,7 +200,7 @@ namespace Pathfinding {
} }
} }
bool mecanim = GameObject.FindObjectOfType(typeof(Animator)) != null; bool mecanim = Object.FindFirstObjectByType<Animator>() != null;
string query = updateURL+ string query = updateURL+
"?v="+AstarPath.Version+ "?v="+AstarPath.Version+
"&pro=0"+ "&pro=0"+