Skip to content
Snippets Groups Projects
Commit 4d1de0bf authored by MaZiFAU's avatar MaZiFAU
Browse files

Fixed Editor StageFile retrieval

parent 722b1392
No related branches found
No related tags found
No related merge requests found
Pipeline #5974 passed
Showing
with 17 additions and 20841 deletions
...@@ -98,29 +98,25 @@ public enum Directories ...@@ -98,29 +98,25 @@ public enum Directories
FactStateMachines, FactStateMachines,
} }
public static string debug_path = "hey";
public static string CreateHierarchiePath(List<Directories> hierarchie, string prefix = "", string postfix = "") public static string CreateHierarchiePath(List<Directories> hierarchie, string prefix = "", string postfix = "")
{ {
foreach (var dir in hierarchie) foreach (var dir in hierarchie)
prefix = System.IO.Path.Combine(prefix, dir.ToString()); prefix = Path.Combine(prefix, dir.ToString());
return System.IO.Path.Combine(prefix, postfix); return Path.Combine(prefix, postfix);
} }
public static string Get_DataPath() public static string Get_DataPath()
{ {
if (Application.isEditor)
return Path.Combine(Application.dataPath, "StreamingAssets", "StreamToDataPath_withHandler");
string Target_StreamToDataPath_writeable = Path.Combine(Application.persistentDataPath, "DataPath_writeable"); return Opsys switch
string dataPath = Opsys switch
{ {
OperationSystem.Android => Target_StreamToDataPath_writeable, OperationSystem.Android => Path.Combine(Application.persistentDataPath, "DataPath_writeable"),
OperationSystem.Windows or _ => Application.dataPath, OperationSystem.Windows or _ => Application.dataPath,
}; };
if(Application.isEditor) { dataPath = Target_StreamToDataPath_writeable; }
return dataPath;
} }
// TODO! avoid tree traversel with name // TODO! avoid tree traversel with name
...@@ -137,22 +133,18 @@ public static string CreatePathToFile(out bool file_exists, string name, string ...@@ -137,22 +133,18 @@ public static string CreatePathToFile(out bool file_exists, string name, string
break; break;
} }
string path = Application.persistentDataPath; string path = use_install_folder
if (use_install_folder) ? Get_DataPath()
{ : Application.persistentDataPath;
path=Get_DataPath();
}
if (hierarchie != null) if (hierarchie != null)
{ {
path = CreateHierarchiePath(hierarchie, path); path = CreateHierarchiePath(hierarchie, path);
System.IO.Directory.CreateDirectory(path); Directory.CreateDirectory(path);
} }
path = System.IO.Path.Combine(path, name + ending); path = Path.Combine(path, name + ending);
file_exists = System.IO.File.Exists(path); file_exists = File.Exists(path);
debug_path = path;
return path; return path;
} }
......
This diff is collapsed.
fileFormatVersion: 2
guid: cbfb25bc853f2854ebb5bee5938155e9
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 2cb068664239732498024617691241ad
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 8ba87d3b09b3b7744ba16b6ad5718695
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
{
"category": "Demo Category",
"number": 1,
"description": "Tree Stage",
"scene": "RiverWorld",
"use_install_folder": true,
"solution": {
"ValidationSet": [
{
"MasterIDs": [
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3"
],
"SolutionIndex": [],
"RelationIndex": [],
"ComparerString": "LineFactHightDirectionComparer"
}
],
"ExposedSolutionFacts": [],
"ScrollOverwrites": {},
"ImmutableFacts": [],
"WorkflowGadgetDict": {
"-1": null
},
"MetaInf": {
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact1": {
"workflow_id": 0,
"active": true,
"isImmutable": false
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2": {
"workflow_id": 1,
"active": true,
"isImmutable": false
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3": {
"workflow_id": 2,
"active": true,
"isImmutable": false
}
},
"Workflow": [
{
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact1",
"samestep": false,
"steplink": 3,
"creation": true,
"gadget_rank": -1,
"scroll_label": null,
"GadgetFlow": [],
"GadgetTime": 0.0
},
{
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2",
"samestep": true,
"steplink": 0,
"creation": true,
"gadget_rank": -1,
"scroll_label": null,
"GadgetFlow": [],
"GadgetTime": 0.0
},
{
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3",
"samestep": true,
"steplink": 0,
"creation": true,
"gadget_rank": -1,
"scroll_label": null,
"GadgetFlow": [],
"GadgetTime": 0.0
}
],
"marker": 3,
"worksteps": 1,
"backlog": 0,
"soft_resetted": false,
"invoke": true,
"MaxLabelId": 2,
"UnusedLabelIds": [],
"JsonFactSpace": {
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact1": {
"Point": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"magnitude": 0.0,
"sqrMagnitude": 0.0
},
"Normal": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"s_type": "PointFact",
"_CustomLabel": null,
"hasCustomLabel": false,
"LabelId": 1
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2": {
"Point": {
"x": 0.0,
"y": 6.0,
"z": 0.0,
"normalized": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"magnitude": 6.0,
"sqrMagnitude": 36.0
},
"Normal": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"s_type": "PointFact",
"_CustomLabel": null,
"hasCustomLabel": false,
"LabelId": 2
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3": {
"s_type": "LineFact",
"Pid1": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact1",
"Pid2": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2",
"Dir": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"_CustomLabel": null,
"hasCustomLabel": false,
"LabelId": 0
}
},
"name": null,
"path": null
},
"record_index": null,
"solution_approches": [],
"AllowedScrolls": null,
"AllowedGadgets": null,
"name": "TechDemo A",
"path": null
}
\ No newline at end of file
fileFormatVersion: 2
guid: 41dda5511c2025a43afcac14b4e5c941
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
{
"category": "Demo Category",
"number": 2,
"description": "River Stage",
"scene": "RiverWorld",
"use_install_folder": true,
"solution": {
"ValidationSet": [
{
"MasterIDs": [
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6"
],
"SolutionIndex": [],
"RelationIndex": [],
"ComparerString": "LineFactHightDirectionComparer"
},
{
"MasterIDs": [
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6"
],
"SolutionIndex": [],
"RelationIndex": [],
"ComparerString": "LineSpanningOverRiverWorldComparer"
},
{
"MasterIDs": [],
"SolutionIndex": [
1
],
"RelationIndex": [
0
],
"ComparerString": "LineFactHightComparer"
}
],
"ExposedSolutionFacts": [],
"ScrollOverwrites": {},
"ImmutableFacts": [],
"WorkflowGadgetDict": {
"-1": null
},
"MetaInf": {
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact4": {
"workflow_id": 0,
"active": true,
"isImmutable": false
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5": {
"workflow_id": 1,
"active": true,
"isImmutable": false
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6": {
"workflow_id": 2,
"active": true,
"isImmutable": false
}
},
"Workflow": [
{
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact4",
"samestep": false,
"steplink": 3,
"creation": true,
"gadget_rank": -1,
"scroll_label": null,
"GadgetFlow": [],
"GadgetTime": 0.0
},
{
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5",
"samestep": true,
"steplink": 0,
"creation": true,
"gadget_rank": -1,
"scroll_label": null,
"GadgetFlow": [],
"GadgetTime": 0.0
},
{
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6",
"samestep": true,
"steplink": 0,
"creation": true,
"gadget_rank": -1,
"scroll_label": null,
"GadgetFlow": [],
"GadgetTime": 0.0
}
],
"marker": 3,
"worksteps": 1,
"backlog": 0,
"soft_resetted": false,
"invoke": true,
"MaxLabelId": 2,
"UnusedLabelIds": [],
"JsonFactSpace": {
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact4": {
"Point": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"magnitude": 0.0,
"sqrMagnitude": 0.0
},
"Normal": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"s_type": "PointFact",
"_CustomLabel": null,
"hasCustomLabel": false,
"LabelId": 1
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5": {
"Point": {
"x": 0.0,
"y": 6.0,
"z": 0.0,
"normalized": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"magnitude": 6.0,
"sqrMagnitude": 36.0
},
"Normal": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"s_type": "PointFact",
"_CustomLabel": null,
"hasCustomLabel": false,
"LabelId": 2
},
"http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6": {
"s_type": "LineFact",
"Pid1": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact4",
"Pid2": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5",
"Dir": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"magnitude": 1.0,
"sqrMagnitude": 1.0
},
"_CustomLabel": null,
"hasCustomLabel": false,
"LabelId": 0
}
},
"name": null,
"path": null
},
"record_index": null,
"solution_approches": [],
"AllowedScrolls": [
"http://mathhub.info/FrameIT/frameworld?OppositeLen"
],
"AllowedGadgets": [
{
"s_type": "Pointer",
"Rank": 1,
"UiName": "Pointer",
"MaxRange": "Infinity",
"MaxHeight": "Infinity",
"ButtonIndx": 1,
"MaterialIndx": 0,
"LayerHitMask": {
"value": 1581105
},
"SecondaryLayerMask": {
"value": 0
},
"Workflow": []
},
{
"s_type": "Tape",
"Rank": 2,
"UiName": "Tape",
"MaxRange": 2.5,
"MaxHeight": 2.5,
"ButtonIndx": 2,
"MaterialIndx": 0,
"LayerHitMask": {
"value": 1024
},
"SecondaryLayerMask": {
"value": 0
},
"Workflow": []
},
{
"s_type": "AngleTool",
"Rank": 3,
"UiName": "Angle Tool",
"MaxRange": "Infinity",
"MaxHeight": "Infinity",
"ButtonIndx": 3,
"MaterialIndx": 1,
"LayerHitMask": {
"value": 1024
},
"SecondaryLayerMask": {
"value": 0
},
"Workflow": []
},
{
"s_type": "LineTool",
"Rank": 4,
"UiName": "Line Tool",
"MaxRange": "Infinity",
"MaxHeight": "Infinity",
"ButtonIndx": 4,
"MaterialIndx": 0,
"LayerHitMask": {
"value": 1024
},
"SecondaryLayerMask": {
"value": 0
},
"Workflow": []
},
{
"s_type": "LotTool",
"Rank": 5,
"UiName": "Lot Tool",
"MaxRange": "Infinity",
"MaxHeight": "Infinity",
"ButtonIndx": 5,
"MaterialIndx": 0,
"LayerHitMask": {
"value": 535569
},
"SecondaryLayerMask": {
"value": 0
},
"Workflow": []
},
{
"s_type": "Pendulum",
"Rank": 6,
"UiName": "Pendulum",
"MaxRange": "Infinity",
"MaxHeight": "Infinity",
"ButtonIndx": 6,
"MaterialIndx": 0,
"LayerHitMask": {
"value": 1024
},
"SecondaryLayerMask": {
"value": 1
},
"Workflow": []
},
{
"s_type": "Remover",
"Rank": 8,
"UiName": "Delete Fact",
"MaxRange": "Infinity",
"MaxHeight": "Infinity",
"ButtonIndx": 8,
"MaterialIndx": 0,
"LayerHitMask": {
"value": 64512
},
"SecondaryLayerMask": {
"value": 0
},
"Workflow": []
}
],
"name": "TechDemo B",
"path": null
}
\ No newline at end of file
fileFormatVersion: 2
guid: 57c26029b000ca64ca57685dba4bd082
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: 82a2bc667aa1ebf46bb2a36bd51324cb guid: cbfb25bc853f2854ebb5bee5938155e9
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: ff0a7c5092a226b4fadb8e48adb580b4 guid: 2cb068664239732498024617691241ad
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: e91cf6d7f4d81bb46a18a46e0788afd4 guid: 8ba87d3b09b3b7744ba16b6ad5718695
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 195df17949e85d146a570194f168bf07 guid: 41dda5511c2025a43afcac14b4e5c941
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: a5dd57ea3c70d7741a8140588e416068 guid: 57c26029b000ca64ca57685dba4bd082
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment