You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
Fixed session path in Packages crashing unity when installed through git
Difference to master:
- Exported as package for Unity Package Manager using Unity package tools
- Changed default editor path to Packages/com.seneral.nodeeditorframework
/* Instructions for custom windows! Read if you copy this code to create a custom window for your tool
13
+
14
+
If you use NodeEditorUserCache to cache and manage the session files, you will need a path to save the curSession and lastSession files to
15
+
You can continue using the default temp folder, but then your window will share the session with the default window, which might not be desired
16
+
To change the temp folder of this window, there are several options, depending on whether you intent to distribute through the Unity Package Manager or not:
17
+
18
+
Distribution through Unity Package Manager:
19
+
The temp folder HAS to be in the Assets folder, so the Packages/ subfolder won't do. Here are your options:
20
+
1. Put your temp folder in a subfolder of the existing temp folder by writing to TEMP_PATH_SUBFOLDER (e.g. "Texture_Composer/") (RECOMMENDED)
21
+
2. Change TEMP_PATH_MARKER_GUID to any GUID generated by Unity and change the default location in TEMP_PATH_DEFAULT
22
+
To generate a new GUID, create any file, read GUID from .meta file, and delete the file
23
+
This will allow users to move your temp folder individually by moving a specifically created marker file
24
+
// Both base upon a new variable temp path system, only required if we have no folder in Assets/ that we can call ours to store the sessions in
25
+
// It will start with a default folder, but will allow users to easily move it by moving the files and a marker to any folder in Assets/
26
+
27
+
Normal Distribution as unitypackage or through the Asset Store:
28
+
You can use your editorPath where the scripts are stored as a base for storing the temp files. Two options:
29
+
1. Do not change anything and use NodeEditor.editorPath as storage folder (DEFAULT, RECOMMENDED)
30
+
Optionally store in a subfolder specified by TEMP_PATH_SUBFOLDER (e.g. "Texture_Composer/")
31
+
ANY editor tool that embeds the Node Editor Framework in a custom location needs to change NodeEditor.editorPath anyway
32
+
3. Change TEMP_PATH_FIXED to a fixed path in the Assets folder, preferrably in your own tools folder
33
+
*/
34
+
privateconstboolTEMP_PATH_USE_EDITOR_PATH_IF_IN_ASSETS=true;// If NodeEditor.editorPath starts with Assets/, use that as a base folder
35
+
privateconststringTEMP_PATH_MARKER_GUID="7b443eac9ba200a4d8d0c7640900a150";// Marker GUID of default Node Editor Window
Debug.LogWarning("Created temp marker '"+tempPath+"'! You can move this marker along with the cache files curSession and lastSession to a different cache location.");
0 commit comments