remove all corutine base restAPI call
This commit is contained in:
@@ -191,6 +191,7 @@ namespace RTG
|
|||||||
foreach (var moduleType in allModuleTypes)
|
foreach (var moduleType in allModuleTypes)
|
||||||
{
|
{
|
||||||
var allModulesInScene = MonoBehaviour.FindObjectsOfType(moduleType);
|
var allModulesInScene = MonoBehaviour.FindObjectsOfType(moduleType);
|
||||||
|
|
||||||
foreach(var module in allModulesInScene)
|
foreach(var module in allModulesInScene)
|
||||||
{
|
{
|
||||||
MonoBehaviour moduleMono = module as MonoBehaviour;
|
MonoBehaviour moduleMono = module as MonoBehaviour;
|
||||||
|
|||||||
@@ -119,11 +119,6 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
--- !u!224 &80690333 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 6579092525594939345}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &80980154
|
--- !u!1 &80980154
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -4166,11 +4161,6 @@ PrefabInstance:
|
|||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 6a9d8c08cbd13f3419d22b5bafd16c28, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 6a9d8c08cbd13f3419d22b5bafd16c28, type: 3}
|
||||||
--- !u!224 &384003842 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 225909343286015538, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 6579092525594939345}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &443563066
|
--- !u!1 &443563066
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -6251,8 +6241,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: ff02e87168389f34ca05f3ccf9e830c8, type: 3}
|
m_Script: {fileID: 11500000, guid: ff02e87168389f34ca05f3ccf9e830c8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
spawnerIconWidth: 0
|
|
||||||
spawnerIconHeight: 0
|
|
||||||
--- !u!114 &1157598132
|
--- !u!114 &1157598132
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -6882,17 +6870,6 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1350516100}
|
m_GameObject: {fileID: 1350516100}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
--- !u!114 &1351749705 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 6579092525594939345}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1407014991
|
--- !u!1 &1407014991
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -7783,7 +7760,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 2124509610}
|
- {fileID: 2124509610}
|
||||||
- {fileID: 80690333}
|
- {fileID: 2063947988}
|
||||||
- {fileID: 1216065598}
|
- {fileID: 1216065598}
|
||||||
- {fileID: 1821473417}
|
- {fileID: 1821473417}
|
||||||
- {fileID: 2078174713}
|
- {fileID: 2078174713}
|
||||||
@@ -7929,6 +7906,322 @@ MonoBehaviour:
|
|||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_IsOn: 0
|
m_IsOn: 0
|
||||||
|
--- !u!1001 &2063947987
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 1916153470}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 31022855806739745, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_MovementType
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 588411198089990919, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Size
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 588411198089990919, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Value
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1073750513953127727, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Type
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1158579472109067453, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.a
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1158579472109067453, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.b
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1158579472109067453, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.g
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1158579472109067453, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.r
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2084682016205783184, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Sprite
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2084682016205783184, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.a
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2222743492580726404, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: LogicDataWindow
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2222743492580726404, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2937901397465735005, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.a
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Pivot.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Pivot.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: -327
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 350
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalScale.x
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalScale.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalScale.z
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: -136.50012
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 300
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 2000
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 1000
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: -1068.1562
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 402.65002
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.a
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.b
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.g
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.r
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5255566545530560444, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 1.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5255566545530560444, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5255566545530560444, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6285377767518673600, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Sprite
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6285377767518673600, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Color.a
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6356363624364328470, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6356363624364328470, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6356363624364328470, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6940169657633229565, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Size
|
||||||
|
value: 0.35100004
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6940169657633229565, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Value
|
||||||
|
value: 0.6499999
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Colors.m_SelectedColor.b
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Colors.m_SelectedColor.g
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_Colors.m_SelectedColor.r
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7982483741311374213, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7982483741311374213, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7982483741311374213, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 2222743492580726404, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 2063947992}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
--- !u!224 &2063947988 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2063947987}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!224 &2063947989 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 225909343286015538, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2063947987}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &2063947990 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2063947987}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &2063947991 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2222743492580726404, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2063947987}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &2063947992
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2063947991}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: db23f43a626977e499745e70cceaae33, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
UIPrefabPath: UIPrefab
|
||||||
|
logicWindow: {fileID: 2063947991}
|
||||||
|
LogicPrefab: {fileID: 2210399282865539074, guid: 72314043a41090846a8c16ad04f3c028, type: 3}
|
||||||
|
LinePrefab: {fileID: 6254276411767355245, guid: c899c98324602eb4fbe900753508f64d, type: 3}
|
||||||
|
logicContent: {fileID: 2063947989}
|
||||||
|
backGround: {fileID: 2063947990}
|
||||||
--- !u!224 &2078174713 stripped
|
--- !u!224 &2078174713 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 4984763691913443583, guid: 91b280356e2a9674aac91102f2da87f8, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4984763691913443583, guid: 91b280356e2a9674aac91102f2da87f8, type: 3}
|
||||||
@@ -8120,11 +8413,11 @@ PrefabInstance:
|
|||||||
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
||||||
propertyPath: backGround
|
propertyPath: backGround
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1351749705}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
||||||
propertyPath: LogicWindow
|
propertyPath: LogicWindow
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 80690333}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
||||||
propertyPath: webReceiver
|
propertyPath: webReceiver
|
||||||
value:
|
value:
|
||||||
@@ -8132,7 +8425,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
- target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3}
|
||||||
propertyPath: LogicContent
|
propertyPath: LogicContent
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 384003842}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
@@ -8189,7 +8482,7 @@ MonoBehaviour:
|
|||||||
m_TargetGraphic: {fileID: 6474398473578022840}
|
m_TargetGraphic: {fileID: 6474398473578022840}
|
||||||
m_HandleRect: {fileID: 8000945978192851396}
|
m_HandleRect: {fileID: 8000945978192851396}
|
||||||
m_Direction: 2
|
m_Direction: 2
|
||||||
m_Value: 0
|
m_Value: 1
|
||||||
m_Size: 1
|
m_Size: 1
|
||||||
m_NumberOfSteps: 0
|
m_NumberOfSteps: 0
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
@@ -8848,243 +9141,6 @@ MonoBehaviour:
|
|||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1
|
||||||
--- !u!1001 &6579092525594939345
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 1916153470}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 31022855806739745, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_MovementType
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 588411198089990919, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Size
|
|
||||||
value: 0.79725
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 588411198089990919, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Value
|
|
||||||
value: 0.7
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1073750513953127727, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Type
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2084682016205783184, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Sprite
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2084682016205783184, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.a
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2222743492580726404, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: LogicDataWindow
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2937901397465735005, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.a
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: -327
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 300
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: -136.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 316
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3202402725712308353, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 2000
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 1000
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: -1081.1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4141025361698125247, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 395.15002
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.a
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.b
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.g
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4980370143534209375, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.r
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5255566545530560444, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 1.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5255566545530560444, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5255566545530560444, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6285377767518673600, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Sprite
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6285377767518673600, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Color.a
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6356363624364328470, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6356363624364328470, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6356363624364328470, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6940169657633229565, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Size
|
|
||||||
value: 0.301
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6940169657633229565, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Value
|
|
||||||
value: 0.65
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Colors.m_SelectedColor.b
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Colors.m_SelectedColor.g
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7672464725508683099, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_Colors.m_SelectedColor.r
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7982483741311374213, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7982483741311374213, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7982483741311374213, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: ea4abd0239cb35e47914f9614cf08d69, type: 3}
|
|
||||||
--- !u!1 &6774851701291315266
|
--- !u!1 &6774851701291315266
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using UnityEngine;
|
|||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using SFB;
|
using SFB;
|
||||||
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
[RequireComponent(typeof(Button))]
|
[RequireComponent(typeof(Button))]
|
||||||
public class CanvasSampleOpenFileImage : MonoBehaviour, IPointerDownHandler {
|
public class CanvasSampleOpenFileImage : MonoBehaviour, IPointerDownHandler {
|
||||||
@@ -46,8 +47,8 @@ public class CanvasSampleOpenFileImage : MonoBehaviour, IPointerDownHandler {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
private IEnumerator OutputRoutine(string url) {
|
private IEnumerator OutputRoutine(string url) {
|
||||||
var loader = new WWW(url);
|
UnityWebRequest loader = new UnityWebRequest(url);
|
||||||
yield return loader;
|
yield return loader;
|
||||||
output.texture = loader.texture;
|
//output.texture = loader.texture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ using UnityEngine;
|
|||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using SFB;
|
using SFB;
|
||||||
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
[RequireComponent(typeof(Button))]
|
[RequireComponent(typeof(Button))]
|
||||||
public class CanvasSampleOpenFileText : MonoBehaviour, IPointerDownHandler {
|
public class CanvasSampleOpenFileText : MonoBehaviour, IPointerDownHandler {
|
||||||
@@ -46,8 +47,8 @@ public class CanvasSampleOpenFileText : MonoBehaviour, IPointerDownHandler {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
private IEnumerator OutputRoutine(string url) {
|
private IEnumerator OutputRoutine(string url) {
|
||||||
var loader = new WWW(url);
|
UnityWebRequest loader = new UnityWebRequest(url);
|
||||||
yield return loader;
|
yield return loader;
|
||||||
output.text = loader.text;
|
//output.text = loader.text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ using UnityEngine;
|
|||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using SFB;
|
using SFB;
|
||||||
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
[RequireComponent(typeof(Button))]
|
[RequireComponent(typeof(Button))]
|
||||||
public class CanvasSampleOpenFileTextMultiple : MonoBehaviour, IPointerDownHandler {
|
public class CanvasSampleOpenFileTextMultiple : MonoBehaviour, IPointerDownHandler {
|
||||||
@@ -53,9 +54,9 @@ public class CanvasSampleOpenFileTextMultiple : MonoBehaviour, IPointerDownHandl
|
|||||||
private IEnumerator OutputRoutine(string[] urlArr) {
|
private IEnumerator OutputRoutine(string[] urlArr) {
|
||||||
var outputText = "";
|
var outputText = "";
|
||||||
for (int i = 0; i < urlArr.Length; i++) {
|
for (int i = 0; i < urlArr.Length; i++) {
|
||||||
var loader = new WWW(urlArr[i]);
|
UnityWebRequest loader = new UnityWebRequest(urlArr[i]);
|
||||||
yield return loader;
|
yield return loader;
|
||||||
outputText += loader.text;
|
// outputText += loader.text;
|
||||||
}
|
}
|
||||||
output.text = outputText;
|
output.text = outputText;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ namespace Octopus.Simulator
|
|||||||
|
|
||||||
public event Action<LogicData> onLogicUpdated;
|
public event Action<LogicData> onLogicUpdated;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -27,23 +25,16 @@ namespace Octopus.Simulator
|
|||||||
|
|
||||||
public void RequestInfo()
|
public void RequestInfo()
|
||||||
{
|
{
|
||||||
WebManager.Instance.Request_Get($"{WebManager.Instance.apiConfig.logic}/{WebParameters.config.logicId}", (flag, value) =>
|
var requestURL = $"{WebManager.Instance.apiConfig.logic}/{WebParameters.config.logicId}";
|
||||||
{
|
|
||||||
if (flag)
|
|
||||||
{
|
|
||||||
var info = JsonConvert.DeserializeObject<LogicInfo>(value);
|
|
||||||
onLogicUpdated?.Invoke(info.data);
|
|
||||||
GetDataFromInfo(info.data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
WebManager.Instance.Reqeust_Get<LogicInfo>($"{WebManager.Instance.apiConfig.logic}/{WebParameters.config.logicId}",GetDataFromResponse);
|
|
||||||
|
|
||||||
|
WebManager.Instance.Reqeust<LogicData>(requestURL, RequestType.GET, GetDataFromInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDataFromInfo(LogicData Data)
|
void GetDataFromInfo(LogicData Data)
|
||||||
{
|
{
|
||||||
|
onLogicUpdated?.Invoke(Data);
|
||||||
|
|
||||||
currentData = Data;
|
currentData = Data;
|
||||||
config = Data.webConfig;
|
config = Data.webConfig;
|
||||||
if (currentData.ModelFiles.Count >= 1)
|
if (currentData.ModelFiles.Count >= 1)
|
||||||
@@ -57,10 +48,5 @@ namespace Octopus.Simulator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDataFromResponse(LogicInfo response)
|
|
||||||
{
|
|
||||||
Debug.Log(response.data.ToString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,95 +5,81 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Octopus.Simulator.Networks;
|
using Octopus.Simulator.Networks;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
namespace Octopus.Simulator
|
namespace Octopus.Simulator
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class LogicInfo
|
public class Base<T>
|
||||||
{
|
{
|
||||||
public int? status=0;
|
public int? status = 0;
|
||||||
public string code;
|
public string? code;
|
||||||
public string message;
|
public string? message;
|
||||||
public LogicData data = new LogicData();
|
public T? data;
|
||||||
public Meta meta;
|
public Meta? meta;
|
||||||
public string timestamp;
|
public string? timestamp;
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class SimulatorPostClass
|
|
||||||
{
|
|
||||||
public int? status=0;
|
|
||||||
public string code;
|
|
||||||
public string message;
|
|
||||||
public SimulationData data = new SimulationData();
|
|
||||||
public Meta meta;
|
|
||||||
public string timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class SimulatorGetClass
|
|
||||||
{
|
|
||||||
public int? status=0;
|
|
||||||
public string code;
|
|
||||||
public string message;
|
|
||||||
public SimulatorGetData data = new SimulatorGetData();
|
|
||||||
public Meta meta;
|
|
||||||
public string timestamp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimulationData
|
public class SimulationData
|
||||||
{
|
{
|
||||||
public string insertedId;
|
public int? insertedId;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimulatorGetData
|
public class SimulatorGetData
|
||||||
{
|
{
|
||||||
public string simulationCode;
|
public string? simulationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class UpdatedSimulationsInfo
|
||||||
|
{
|
||||||
|
public int? updatedCount;
|
||||||
|
public List<int>? updatedIds = new List<int>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class LogicData
|
public class LogicData
|
||||||
{
|
{
|
||||||
public int? id=0;
|
public int? id = 0;
|
||||||
public int? projectId=0;
|
public int? projectId = 0;
|
||||||
//public int logicId;
|
//public int logicId;
|
||||||
public int? userId=0;
|
public int? userId = 0;
|
||||||
public string name;
|
public string? name;
|
||||||
public string simulationCode;
|
public string? simulationCode;
|
||||||
public logicData data;
|
public logicData? data;
|
||||||
public LogicWebConfig webConfig;
|
public LogicWebConfig? webConfig;
|
||||||
//public SimulationParameters parameters;
|
//public SimulationParameters parameters;
|
||||||
public string status;
|
public string? status;
|
||||||
public string resultData;
|
public string? resultData;
|
||||||
public string createdAt;
|
public string? createdAt;
|
||||||
public string updatedAt;
|
public string? updatedAt;
|
||||||
public string deletedAt;
|
public string? deletedAt;
|
||||||
//public SimulationProject project;
|
//public SimulationProject project;
|
||||||
public List<SimulationModelFile> ModelFiles=new List<SimulationModelFile>();
|
public List<SimulationModelFile>? ModelFiles = new List<SimulationModelFile>();
|
||||||
//public SimulationComponent component;
|
//public SimulationComponent component;
|
||||||
//public SimulationUser user;
|
//public SimulationUser user;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class logicData
|
public class logicData
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public bool trace;
|
public bool trace;
|
||||||
public List<LogicQueue> queues;
|
public List<LogicQueue>? queues;
|
||||||
public List<LogicResource> resources;
|
public List<LogicResource>? resources;
|
||||||
public List<LogicStore> stores;
|
public List<LogicStore>? stores;
|
||||||
|
|
||||||
[SerializeReference]
|
[SerializeReference]
|
||||||
[JsonConverter(typeof(ComponentsConverter))]
|
[JsonConverter(typeof(ComponentsConverter))]
|
||||||
public List<ILogicComponent> components;
|
public List<ILogicComponent>? components;
|
||||||
public int? simulation_time=0;
|
|
||||||
|
public int? simulation_time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class paramclass
|
public class paramclass
|
||||||
{
|
{
|
||||||
public SimulationParameters parameters=new SimulationParameters();
|
public SimulationParameters? parameters = new SimulationParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -101,28 +87,31 @@ namespace Octopus.Simulator
|
|||||||
{
|
{
|
||||||
public bool realTime = false;
|
public bool realTime = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class emptyClass
|
public class emptyClass
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimulationParameters
|
public class SimulationParameters
|
||||||
{
|
{
|
||||||
public int? speed=0;
|
public int? speed = 0;
|
||||||
public int? duration=0;
|
public int? duration = 0;
|
||||||
public bool real_time;
|
public bool real_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class HistoryParameters
|
public class HistoryParameters
|
||||||
{
|
{
|
||||||
public int? projectId=0;
|
public int? projectId = 0;
|
||||||
public int? logicId=0;
|
public int? logicId = 0;
|
||||||
public string logicData;
|
public string? logicData;
|
||||||
public string name;
|
public string? name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public enum LogicItemType
|
public enum LogicItemType
|
||||||
{
|
{
|
||||||
Queue,
|
Queue,
|
||||||
@@ -142,55 +131,55 @@ namespace Octopus.Simulator
|
|||||||
|
|
||||||
public interface ILogicItem
|
public interface ILogicItem
|
||||||
{
|
{
|
||||||
string Name { get; }
|
string? Name { get; }
|
||||||
string Description { get; }
|
string? Description { get; }
|
||||||
string Label { get; }
|
string? Label { get; }
|
||||||
LogicItemType ItemType { get; }
|
LogicItemType ItemType { get; }
|
||||||
}
|
}
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class LogicQueue : ILogicItem
|
public class LogicQueue : ILogicItem
|
||||||
{
|
{
|
||||||
public string name = "";
|
public string? name = "";
|
||||||
public string description = "";
|
public string? description = "";
|
||||||
public string label;
|
public string? label;
|
||||||
public int capacity = 0;
|
public int capacity = 0;
|
||||||
public int quantity;
|
public int quantity;
|
||||||
public int priority_order;
|
public int priority_order;
|
||||||
public string queue_type;
|
public string? queue_type;
|
||||||
public string Name => name;
|
public string? Name => name;
|
||||||
public string Description => description;
|
public string? Description => description;
|
||||||
public string Label => label;
|
public string? Label => label;
|
||||||
public LogicItemType ItemType => LogicItemType.Queue;
|
public LogicItemType ItemType => LogicItemType.Queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class LogicResource : ILogicItem
|
public class LogicResource : ILogicItem
|
||||||
{
|
{
|
||||||
public string name = "";
|
public string? name = "";
|
||||||
public int capacity = 0;
|
public int capacity = 0;
|
||||||
public string description = "";
|
public string? description = "";
|
||||||
public string label;
|
public string? label;
|
||||||
public int? repair_time = 0;
|
public int? repair_time = 0;
|
||||||
public double speed_factor = 0.0;
|
public double speed_factor = 0.0;
|
||||||
public int? breakdown_interval = 0;
|
public int? breakdown_interval = 0;
|
||||||
public string Name => name;
|
public string? Name => name;
|
||||||
public string Description => description;
|
public string? Description => description;
|
||||||
public string Label => label;
|
public string? Label => label;
|
||||||
public LogicItemType ItemType => LogicItemType.Resource;
|
public LogicItemType ItemType => LogicItemType.Resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class LogicStore : ILogicItem
|
public class LogicStore : ILogicItem
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public string description;
|
public string? description;
|
||||||
public string label;
|
public string? label;
|
||||||
public int capacity;
|
public int capacity;
|
||||||
public int quantity;
|
public int quantity;
|
||||||
public int priority_order;
|
public int priority_order;
|
||||||
public string Name => name;
|
public string? Name => name;
|
||||||
public string Description => description;
|
public string? Description => description;
|
||||||
public string Label => label;
|
public string? Label => label;
|
||||||
public LogicItemType ItemType => LogicItemType.Store;
|
public LogicItemType ItemType => LogicItemType.Store;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,73 +187,73 @@ namespace Octopus.Simulator
|
|||||||
public abstract class ILogicComponent : ILogicItem
|
public abstract class ILogicComponent : ILogicItem
|
||||||
{
|
{
|
||||||
public abstract ComponentType Type { get; }
|
public abstract ComponentType Type { get; }
|
||||||
public abstract string Name { get; }
|
public abstract string? Name { get; }
|
||||||
public abstract string Description { get; }
|
public abstract string? Description { get; }
|
||||||
public abstract string Label { get; }
|
public abstract string? Label { get; }
|
||||||
public LogicItemType ItemType => LogicItemType.Component;
|
public LogicItemType ItemType => LogicItemType.Component;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ProductGenerator : ILogicComponent
|
public class ProductGenerator : ILogicComponent
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public int? rate=0;
|
public int? rate = 0;
|
||||||
public string description;
|
public string? description;
|
||||||
public string label;
|
public string? label;
|
||||||
public string output_queue;
|
public string? output_queue;
|
||||||
public string defect_queue;
|
public string? defect_queue;
|
||||||
public string output_resource;
|
public string? output_resource;
|
||||||
public int prod_priority;
|
public int prod_priority;
|
||||||
public int? batch_size=0;
|
public int? batch_size = 0;
|
||||||
public int defect_rate;
|
public int defect_rate;
|
||||||
public int? period=0;
|
public int? period = 0;
|
||||||
public int? capacity = 0;
|
public int? capacity = 0;
|
||||||
public override string Name => name;
|
public override string? Name => name;
|
||||||
public override string Description => description;
|
public override string? Description => description;
|
||||||
public override string Label => label;
|
public override string? Label => label;
|
||||||
public override ComponentType Type => ComponentType.Product_Generator;
|
public override ComponentType Type => ComponentType.Product_Generator;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Processor : ILogicComponent
|
public class Processor : ILogicComponent
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public string description;
|
public string? description;
|
||||||
public string label;
|
public string? label;
|
||||||
public int processing_time;
|
public int processing_time;
|
||||||
public int? batch_size=0;
|
public int? batch_size = 0;
|
||||||
public List<InputQueue> input_queues;
|
public List<InputQueue>? input_queues;
|
||||||
public string output_queue;
|
public string? output_queue;
|
||||||
public string defect_queue;
|
public string? defect_queue;
|
||||||
public string required_resource;
|
public string? required_resource;
|
||||||
public int process_amount;
|
public int process_amount;
|
||||||
public float defect_rate;
|
public float defect_rate;
|
||||||
public override string Name => name;
|
public override string? Name => name;
|
||||||
public override string Description => description;
|
public override string? Description => description;
|
||||||
public override string Label => label;
|
public override string? Label => label;
|
||||||
public override ComponentType Type => ComponentType.Processor;
|
public override ComponentType Type => ComponentType.Processor;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Transporter : ILogicComponent
|
public class Transporter : ILogicComponent
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public string description;
|
public string? description;
|
||||||
public string label;
|
public string? label;
|
||||||
public int? transport_time = 0;
|
public int? transport_time = 0;
|
||||||
public float? transport_distance = 0f;
|
public float? transport_distance = 0f;
|
||||||
public float? movement_speed = 0f;
|
public float? movement_speed = 0f;
|
||||||
public int? capacity = 0;
|
public int? capacity = 0;
|
||||||
public string input_queue;
|
public string? input_queue;
|
||||||
public string output_queue;
|
public string? output_queue;
|
||||||
public string defect_queue;
|
public string? defect_queue;
|
||||||
public string required_resource;
|
public string? required_resource;
|
||||||
public string transporter_type;
|
public string? transporter_type;
|
||||||
public float return_time;
|
public float return_time;
|
||||||
public int min_batch_size;
|
public int min_batch_size;
|
||||||
public override string Name => name;
|
public override string? Name => name;
|
||||||
public override string Description => description;
|
public override string? Description => description;
|
||||||
public override string Label => label;
|
public override string? Label => label;
|
||||||
public override ComponentType Type => ComponentType.Transporter;
|
public override ComponentType Type => ComponentType.Transporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,26 +276,26 @@ namespace Octopus.Simulator
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Conveyor : ILogicComponent
|
public class Conveyor : ILogicComponent
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public string description;
|
public string? description;
|
||||||
public string label;
|
public string? label;
|
||||||
public int move_time;
|
public int move_time;
|
||||||
public float belt_speed;
|
public float belt_speed;
|
||||||
public int? capacity = 0;
|
public int? capacity = 0;
|
||||||
public string input_queue;
|
public string? input_queue;
|
||||||
public string output_queue;
|
public string? output_queue;
|
||||||
public string defect_queue;
|
public string? defect_queue;
|
||||||
public string required_resource;
|
public string? required_resource;
|
||||||
public override string Name => name;
|
public override string? Name => name;
|
||||||
public override string Description => description;
|
public override string? Description => description;
|
||||||
public override string Label => label;
|
public override string? Label => label;
|
||||||
public override ComponentType Type => ComponentType.Conveyor;
|
public override ComponentType Type => ComponentType.Conveyor;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class InputQueue
|
public class InputQueue
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public int required_items;
|
public int required_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,16 +304,17 @@ namespace Octopus.Simulator
|
|||||||
{
|
{
|
||||||
public int id;
|
public int id;
|
||||||
public int userId;
|
public int userId;
|
||||||
public string name;
|
public string? name;
|
||||||
public string description;
|
public string? description;
|
||||||
public string createdAt;
|
public string? createdAt;
|
||||||
public string updatedAt;
|
public string? updatedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimulationModelFile
|
public class SimulationModelFile
|
||||||
{
|
{
|
||||||
public int? id;
|
public int? id;
|
||||||
public WebModelData data;
|
public WebModelData? data;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -332,48 +322,48 @@ namespace Octopus.Simulator
|
|||||||
{
|
{
|
||||||
public int id;
|
public int id;
|
||||||
public int userId;
|
public int userId;
|
||||||
public string name;
|
public string? name;
|
||||||
public string description;
|
public string? description;
|
||||||
public string createdAt;
|
public string? createdAt;
|
||||||
public string updatedAt;
|
public string? updatedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimulationUser
|
public class SimulationUser
|
||||||
{
|
{
|
||||||
public int id;
|
public int id;
|
||||||
public string ccPositionId;
|
public string? ccPositionId;
|
||||||
public string userid;
|
public string? userid;
|
||||||
public string name;
|
public string? name;
|
||||||
public string auth;
|
public string? auth;
|
||||||
public string email;
|
public string? email;
|
||||||
public bool active;
|
public bool active;
|
||||||
public string joinDate;
|
public string? joinDate;
|
||||||
public bool activeClassifyRule;
|
public bool activeClassifyRule;
|
||||||
public string signatureId;
|
public string? signatureId;
|
||||||
public string employeeNumber;
|
public string? employeeNumber;
|
||||||
public string resignationDate;
|
public string? resignationDate;
|
||||||
public string profileId;
|
public string? profileId;
|
||||||
public string createdAt;
|
public string? createdAt;
|
||||||
public string updatedAt;
|
public string? updatedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class LogicWebConfig
|
public class LogicWebConfig
|
||||||
{
|
{
|
||||||
public List<Node> nodes;
|
public List<Node>? nodes;
|
||||||
public List<Edge> edges;
|
public List<Edge>? edges;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Edge
|
public class Edge
|
||||||
{
|
{
|
||||||
public string id;
|
public string? id;
|
||||||
public EdgeData data;
|
public EdgeData? data;
|
||||||
public string type;
|
public string? type;
|
||||||
public string label;
|
public string? label;
|
||||||
public string source;
|
public string? source;
|
||||||
public string target;
|
public string? target;
|
||||||
public float sourceX;
|
public float sourceX;
|
||||||
public float sourceY;
|
public float sourceY;
|
||||||
public float targetX;
|
public float targetX;
|
||||||
@@ -383,40 +373,40 @@ namespace Octopus.Simulator
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class EdgeData
|
public class EdgeData
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public string type;
|
public string? type;
|
||||||
public string label;
|
public string? label;
|
||||||
public bool visible;
|
public bool visible;
|
||||||
public bool isIgnore;
|
public bool isIgnore;
|
||||||
public bool isShowName;
|
public bool isShowName;
|
||||||
public string description;
|
public string? description;
|
||||||
public Node sourceNode;
|
public Node? sourceNode;
|
||||||
public Node targetNode;
|
public Node? targetNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Node
|
public class Node
|
||||||
{
|
{
|
||||||
public string id;
|
public string? id;
|
||||||
public NodeData data;
|
public NodeData? data;
|
||||||
public string type;
|
public string? type;
|
||||||
public bool dragging;
|
public bool dragging;
|
||||||
public bool isParent;
|
public bool isParent;
|
||||||
public Position position;
|
public Position? position;
|
||||||
public bool resizing;
|
public bool resizing;
|
||||||
public bool selected;
|
public bool selected;
|
||||||
public Dimension dimensions;
|
public Dimension? dimensions;
|
||||||
public bool initialized;
|
public bool initialized;
|
||||||
public HandleBounds handleBounds;
|
public HandleBounds? handleBounds;
|
||||||
public ComputedPosition computedPosition;
|
public ComputedPosition? computedPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class NodeData
|
public class NodeData
|
||||||
{
|
{
|
||||||
public string name;
|
public string? name;
|
||||||
public string type;
|
public string? type;
|
||||||
public string label;
|
public string? label;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -426,18 +416,18 @@ namespace Octopus.Simulator
|
|||||||
public float y;
|
public float y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Dimension
|
public class Dimension
|
||||||
{
|
{
|
||||||
public float width;
|
public float width;
|
||||||
public float height;
|
public float height;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class HandleBounds
|
public class HandleBounds
|
||||||
{
|
{
|
||||||
public List<Handle> source;
|
public List<Handle>? source;
|
||||||
public List<Handle> target;
|
public List<Handle>? target;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -445,10 +435,10 @@ namespace Octopus.Simulator
|
|||||||
{
|
{
|
||||||
public float x;
|
public float x;
|
||||||
public float y;
|
public float y;
|
||||||
public string id;
|
public string? id;
|
||||||
public float width;
|
public float width;
|
||||||
public float height;
|
public float height;
|
||||||
public string position;
|
public string? position;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -460,7 +450,7 @@ namespace Octopus.Simulator
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Meta
|
public class Meta
|
||||||
{
|
{
|
||||||
public Param param;
|
public Param? param;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -469,6 +459,8 @@ namespace Octopus.Simulator
|
|||||||
public int id;
|
public int id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
public class ComponentsConverter : JsonConverter<List<ILogicComponent>>
|
public class ComponentsConverter : JsonConverter<List<ILogicComponent>>
|
||||||
{
|
{
|
||||||
public override bool CanWrite => false;
|
public override bool CanWrite => false;
|
||||||
|
|||||||
@@ -56,57 +56,81 @@ namespace Octopus.Simulator
|
|||||||
{
|
{
|
||||||
isplaying = false;
|
isplaying = false;
|
||||||
Button_Play.image.sprite = pause;
|
Button_Play.image.sprite = pause;
|
||||||
Request_SimulationPause(null, $"{requestAPI}/{WebParameters.id}/pause");
|
|
||||||
|
var requestURL = $"{requestAPI}/{WebParameters.id}/pause";
|
||||||
|
webmanager.Reqeust<HistoryParameters>(requestURL, RequestType.POST, null);
|
||||||
|
//Request_SimulationPause(null, $"{requestAPI}/{WebParameters.id}/pause");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isplaying = true;
|
isplaying = true;
|
||||||
Button_Play.image.sprite = playing;
|
Button_Play.image.sprite = playing;
|
||||||
Request_SimulationCreate(param, requestAPI);
|
|
||||||
|
webmanager.Reqeust<SimulationData>(requestAPI, RequestType.POST, SimulationCreate, param);
|
||||||
|
//Request_SimulationCreate(param, requestAPI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Request_SimulationCreate(HistoryParameters param, string api)
|
//void Request_SimulationCreate(HistoryParameters param, string api)
|
||||||
{
|
//{
|
||||||
webmanager.Request_Post(param, api, (flag, value) =>
|
// webmanager.Request_Post(param, api, (flag, value) =>
|
||||||
{
|
// {
|
||||||
if (flag)
|
// if (flag)
|
||||||
{
|
// {
|
||||||
SimulatorPostClass info = JsonConvert.DeserializeObject<SimulatorPostClass>(value);
|
// SimulatorPostClass info = JsonConvert.DeserializeObject<SimulatorPostClass>(value);
|
||||||
WebParameters.id = int.Parse(info.data.insertedId);
|
// WebParameters.id = (int)info.data.insertedId;
|
||||||
|
|
||||||
Application.ExternalCall("setSimulationID", WebParameters.id);
|
// Application.ExternalCall("setSimulationID", WebParameters.id);
|
||||||
Debug.Log("Call external setSimulationID" + WebParameters.id.ToString());
|
// Debug.Log("Call external setSimulationID" + WebParameters.id.ToString());
|
||||||
Get_Simulation();
|
// Get_Simulation();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
//void Request_SimulationPause(HistoryParameters param, string api)
|
||||||
|
//{
|
||||||
|
// webmanager.Request_Post(param, api, (flag, value) =>
|
||||||
|
// {
|
||||||
|
// if (flag)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//}
|
||||||
|
|
||||||
|
void SimulationCreate(SimulationData response)
|
||||||
|
{
|
||||||
|
WebParameters.id = (int)response.insertedId;
|
||||||
|
Application.ExternalCall("setSimulationID", WebParameters.id);
|
||||||
|
Debug.Log("Call external setSimulationID" + WebParameters.id.ToString());
|
||||||
|
Get_Simulation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Request_SimulationPause(HistoryParameters param, string api)
|
|
||||||
{
|
|
||||||
webmanager.Request_Post(param, api, (flag, value) =>
|
|
||||||
{
|
|
||||||
if (flag)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Get_Simulation()
|
void Get_Simulation()
|
||||||
{
|
{
|
||||||
string api = $"{webmanager.apiConfig.history}/{WebParameters.id}";
|
var reqeustURL = $"{webmanager.apiConfig.history}/{WebParameters.id}";
|
||||||
webmanager.Request_Get(api, (flag, value) =>
|
//webmanager.Request_Get(reqeustURL, (flag, value) =>
|
||||||
{
|
//{
|
||||||
if (flag)
|
// if (flag)
|
||||||
{
|
// {
|
||||||
SimulatorGetClass info = JsonConvert.DeserializeObject<SimulatorGetClass>(value);
|
// SimulatorGetClass info = JsonConvert.DeserializeObject<SimulatorGetClass>(value);
|
||||||
WebParameters.code = info.data.simulationCode;
|
// WebParameters.code = info.data.simulationCode;
|
||||||
SetMqttConnect();
|
// SetMqttConnect();
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
|
WebManager.Instance.Reqeust<SimulatorGetData>(reqeustURL, RequestType.GET, GetSimulationCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GetSimulationCallback(SimulatorGetData response)
|
||||||
|
{
|
||||||
|
WebParameters.code = response.simulationCode;
|
||||||
|
SetMqttConnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetMqttConnect()
|
void SetMqttConnect()
|
||||||
{
|
{
|
||||||
MQTTManager.mqttManager.SubscribeTopic($"simulation/{WebParameters.code}/#");
|
MQTTManager.mqttManager.SubscribeTopic($"simulation/{WebParameters.code}/#");
|
||||||
@@ -119,12 +143,15 @@ namespace Octopus.Simulator
|
|||||||
param.parameters.duration = 3600;
|
param.parameters.duration = 3600;
|
||||||
param.parameters.real_time = true;
|
param.parameters.real_time = true;
|
||||||
string requestAPI = $"{webmanager.apiConfig.history}/{WebParameters.id}/start";
|
string requestAPI = $"{webmanager.apiConfig.history}/{WebParameters.id}/start";
|
||||||
webmanager.Request_Post(param, requestAPI, (flag, value) =>
|
|
||||||
{
|
webmanager.Reqeust<UpdatedSimulationsInfo>(requestAPI, RequestType.POST, null, param);
|
||||||
if (flag)
|
|
||||||
{
|
//webmanager.Request_Post(param, requestAPI, (flag, value) =>
|
||||||
}
|
//{
|
||||||
});
|
// if (flag)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnclickFastForwardBTN()
|
void OnclickFastForwardBTN()
|
||||||
@@ -149,24 +176,48 @@ namespace Octopus.Simulator
|
|||||||
|
|
||||||
void Request_SimulationComplete()
|
void Request_SimulationComplete()
|
||||||
{
|
{
|
||||||
string requestAPI = $"{webmanager.apiConfig.history}/{WebParameters.id}/pause";
|
var requestURL = $"{webmanager.apiConfig.history}/{WebParameters.id}/pause";
|
||||||
webmanager.Request_Post(null, requestAPI, (flag, value) =>
|
|
||||||
{
|
webmanager.Reqeust<UpdatedSimulationsInfo>(requestURL, RequestType.POST, PauseCallback);
|
||||||
if (flag)
|
|
||||||
{
|
//webmanager.Request_Post(null, requestURL, (flag, value) =>
|
||||||
requestAPI = $"{webmanager.apiConfig.history}/{WebParameters.id}/toggle-realtime";
|
//{
|
||||||
RealTime rt = new RealTime();
|
// if (flag)
|
||||||
rt.realTime = false;
|
// {
|
||||||
webmanager.Request_Post(rt, requestAPI, (flag, value) =>
|
// requestURL = $"{webmanager.apiConfig.history}/{WebParameters.id}/toggle-realtime";
|
||||||
{
|
// RealTime rt = new RealTime();
|
||||||
if (flag)
|
// rt.realTime = false;
|
||||||
{
|
|
||||||
emptyClass ec = new emptyClass();
|
// webmanager.Reqeust<RealTime>(requestURL, RequestType.POST, ToggleRealTimeCallback, rt);
|
||||||
webmanager.Request_Post(ec, $"{webmanager.apiConfig.history}/{WebParameters.id}/resume", (flag, value) => { });
|
|
||||||
}
|
// //webmanager.Request_Post(rt, requestURL, (flag, value) =>
|
||||||
});
|
// //{
|
||||||
}
|
// // if (flag)
|
||||||
});
|
// // {
|
||||||
|
// // var reqeustURL = $"{webmanager.apiConfig.history}/{WebParameters.id}/resume";
|
||||||
|
// // emptyClass ec = new emptyClass();
|
||||||
|
// // //webmanager.Request_Post(ec, reqeustURL, (flag, value) => { });
|
||||||
|
|
||||||
|
// // webmanager.Reqeust<emptyClass>(reqeustURL, RequestType.POST, null);
|
||||||
|
// // }
|
||||||
|
// //});
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PauseCallback(UpdatedSimulationsInfo response)
|
||||||
|
{
|
||||||
|
var requsetURL = $"{webmanager.apiConfig.history}/{WebParameters.id}/toggle-realtime";
|
||||||
|
RealTime rt = new RealTime();
|
||||||
|
rt.realTime = false;
|
||||||
|
webmanager.Reqeust<RealTime>(requsetURL, RequestType.POST, ToggleRealTimeCallback, rt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleRealTimeCallback(RealTime response)
|
||||||
|
{
|
||||||
|
var reqeustURL = $"{webmanager.apiConfig.history}/{WebParameters.id}/resume";
|
||||||
|
emptyClass ec = new emptyClass();
|
||||||
|
webmanager.Reqeust<emptyClass>(reqeustURL, RequestType.POST, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,14 +24,23 @@ namespace Octopus.Simulator
|
|||||||
}
|
}
|
||||||
public void RequestInfo()
|
public void RequestInfo()
|
||||||
{
|
{
|
||||||
WebManager.Instance.Request_Get($"{WebManager.Instance.apiConfig.project}/{WebParameters.config.projectId}", (flag, value) =>
|
var reqeustURL = $"{WebManager.Instance.apiConfig.project}/{WebParameters.config.projectId}";
|
||||||
{
|
|
||||||
if (flag)
|
WebManager.Instance.Reqeust<ProjectInfoData>(reqeustURL, RequestType.GET, ProjectInfoCallback);
|
||||||
{
|
|
||||||
var info = JsonConvert.DeserializeObject<ProjectInfo>(value);
|
//WebManager.Instance.Request_Get(reqeustURL, (flag, value) =>
|
||||||
SetText(info.data.name);
|
//{
|
||||||
}
|
// if (flag)
|
||||||
});
|
// {
|
||||||
|
// var info = JsonConvert.DeserializeObject<ProjectInfo>(value);
|
||||||
|
// SetText(info.data.name);
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ProjectInfoCallback(ProjectInfoData response)
|
||||||
|
{
|
||||||
|
SetText(response.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetText(string data)
|
void SetText(string data)
|
||||||
|
|||||||
@@ -4,12 +4,6 @@ using System;
|
|||||||
|
|
||||||
namespace Octopus.Simulator.Networks
|
namespace Octopus.Simulator.Networks
|
||||||
{
|
{
|
||||||
[Serializable]
|
|
||||||
public class ProjectInfo
|
|
||||||
{
|
|
||||||
public ProjectInfoData data;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class WebModelClass
|
public class WebModelClass
|
||||||
{
|
{
|
||||||
@@ -25,12 +19,6 @@ namespace Octopus.Simulator.Networks
|
|||||||
public string info;
|
public string info;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class WebModelReturnClass
|
|
||||||
{
|
|
||||||
public WebModelReturnData data;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class WebModelReturnData
|
public class WebModelReturnData
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,14 +10,26 @@ using System;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Octopus.Simulator;
|
using Octopus.Simulator;
|
||||||
|
|
||||||
|
#pragma warning disable CS8632
|
||||||
|
|
||||||
namespace UVC.Networks
|
namespace UVC.Networks
|
||||||
{
|
{
|
||||||
//API를 통해 서버와 통신하기 위한 함수들이 내장되어 있습니다.
|
//API를 통해 서버와 통신하기 위한 함수들이 내장되어 있습니다.
|
||||||
//Post, Get. Put을 사용하며, Post의 경우엔 Class를 입력으로 받아 Json형식으로 변환하여 업로드합니다.
|
//Post, Get. Put을 사용하며, Post의 경우엔 Class를 입력으로 받아 Json형식으로 변환하여 업로드합니다.
|
||||||
//비동기로 실행하기 위해 Coroutine으로 제작되었으며, callback의 bool값을 통해 서버로부터
|
//비동기로 실행하기 위해 Coroutine으로 제작되었으며, callback의 bool값을 통해 서버로부터
|
||||||
//정상적으로 API가 입력, 결과가 출력되었는지를 확인할 수 있습니다.
|
//정상적으로 API가 입력, 결과가 출력되었는지를 확인할 수 있습니다.
|
||||||
|
|
||||||
|
public enum RequestType
|
||||||
|
{
|
||||||
|
//"GET", "POST", "PUT", "PATCH", "DELETE"
|
||||||
|
GET,
|
||||||
|
POST,
|
||||||
|
PUT,
|
||||||
|
PATCH,
|
||||||
|
DELETE,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class WebManager : MonoBehaviour
|
public class WebManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
static WebManager webManager;
|
static WebManager webManager;
|
||||||
@@ -115,6 +127,7 @@ namespace UVC.Networks
|
|||||||
request.SetRequestHeader("Authorization", "Bearer " + _webConfigLoader.Token);
|
request.SetRequestHeader("Authorization", "Bearer " + _webConfigLoader.Token);
|
||||||
|
|
||||||
yield return request.SendWebRequest();
|
yield return request.SendWebRequest();
|
||||||
|
Debug.Log(URL);
|
||||||
Debug.Log(json);
|
Debug.Log(json);
|
||||||
|
|
||||||
//result가 에러로 왔다면
|
//result가 에러로 왔다면
|
||||||
@@ -217,58 +230,65 @@ namespace UVC.Networks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//별도의 Data Content 가 없을 경우 reqeustURL 과 callback 등 만을 parameter로 넘기면 됨
|
//별도의 Data Content 가 없을 경우 reqeustURL 과 callback 등 만을 parameter로 넘기면 됨
|
||||||
|
//public void Reqeust_Get<T>(string requestURL, Action<T> callback, string json = "")
|
||||||
|
//{
|
||||||
|
// RequestAsync<T>(requestURL, RequestType.GET, json)
|
||||||
|
// .ContinueWith(result => callback?.Invoke(result))
|
||||||
|
// .Forget();
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public void Reqeust_Post<T>(string requestURL, Action<T> callback, string json = "")
|
||||||
|
//{
|
||||||
|
// RequestAsync<T>(requestURL, RequestType.POST, json)
|
||||||
|
// .ContinueWith(result => callback?.Invoke(result))
|
||||||
|
// .Forget();
|
||||||
|
//}
|
||||||
|
|
||||||
public void Reqeust_Get<T>(string requestURL, Action<T> callback, string json = "")
|
//public void Reqeust_Put<T>(string requestURL, Action<T> callback, string json = "")
|
||||||
|
//{
|
||||||
|
// RequestAsync<T>(requestURL, RequestType.PUT, json)
|
||||||
|
// .ContinueWith(result => callback?.Invoke(result))
|
||||||
|
// .Forget();
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public void Reqeust_Patch<T>(string requestURL, Action<T> callback, string json = "")
|
||||||
|
//{
|
||||||
|
// RequestAsync<T>(requestURL, RequestType.PATCH, json)
|
||||||
|
// .ContinueWith(result => callback?.Invoke(result))
|
||||||
|
// .Forget();
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public void Reqeust_Delete<T>(string requestURL, Action<T> callback, string json = "")
|
||||||
|
//{
|
||||||
|
// RequestAsync<T>(requestURL, RequestType.DELETE, json)
|
||||||
|
// .ContinueWith(result => callback?.Invoke(result))
|
||||||
|
// .Forget();
|
||||||
|
//}
|
||||||
|
|
||||||
|
//별도의 Data Content 가 없을 경우 reqeustURL 과 callback 등 만을 parameter로 넘기면 됨
|
||||||
|
public void Reqeust<T>(string requestURL, RequestType type , Action<T> callback, object json = null)
|
||||||
{
|
{
|
||||||
RequestAsync<T>(requestURL, RequestType.GET, json)
|
if ( json == null)
|
||||||
|
{
|
||||||
|
RequestAsync<T>(requestURL, type)
|
||||||
.ContinueWith(result => callback?.Invoke(result))
|
.ContinueWith(result => callback?.Invoke(result))
|
||||||
.Forget();
|
.Forget();
|
||||||
}
|
}
|
||||||
|
else if ( json != null)
|
||||||
|
{
|
||||||
|
var data = JsonConvert.SerializeObject(json);
|
||||||
|
|
||||||
public void Reqeust_Post<T>(string requestURL, Action<T> callback, string json = "")
|
RequestAsync<T>(requestURL, type, data)
|
||||||
{
|
|
||||||
RequestAsync<T>(requestURL, RequestType.POST, json)
|
|
||||||
.ContinueWith(result => callback?.Invoke(result))
|
.ContinueWith(result => callback?.Invoke(result))
|
||||||
.Forget();
|
.Forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reqeust_Put<T>(string requestURL, Action<T> callback, string json = "")
|
|
||||||
{
|
|
||||||
RequestAsync<T>(requestURL, RequestType.PUT, json)
|
|
||||||
.ContinueWith(result => callback?.Invoke(result))
|
|
||||||
.Forget();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Reqeust_Patch<T>(string requestURL, Action<T> callback, string json = "")
|
|
||||||
{
|
|
||||||
RequestAsync<T>(requestURL, RequestType.PATCH, json)
|
|
||||||
.ContinueWith(result => callback?.Invoke(result))
|
|
||||||
.Forget();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Reqeust_Delete<T>(string requestURL, Action<T> callback, string json = "")
|
|
||||||
{
|
|
||||||
RequestAsync<T>(requestURL, RequestType.DELETE, json)
|
|
||||||
.ContinueWith(result => callback?.Invoke(result))
|
|
||||||
.Forget();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public enum RequestType
|
|
||||||
{
|
|
||||||
//"GET", "POST", "PUT", "PATCH", "DELETE"
|
|
||||||
GET,
|
|
||||||
POST,
|
|
||||||
PUT,
|
|
||||||
PATCH,
|
|
||||||
DELETE,
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async UniTask<T> RequestAsync<T>(string requestURL, RequestType type, string json = "")
|
|
||||||
|
|
||||||
|
|
||||||
|
private async UniTask<T> RequestAsync<T>(string requestURL, RequestType type, string json = "")
|
||||||
{
|
{
|
||||||
string fullUrl = _webConfigLoader.BaseUrl + requestURL;
|
string fullUrl = _webConfigLoader.BaseUrl + requestURL;
|
||||||
|
|
||||||
@@ -285,9 +305,11 @@ namespace UVC.Networks
|
|||||||
|
|
||||||
if (IsSuccess(request.result))
|
if (IsSuccess(request.result))
|
||||||
{
|
{
|
||||||
|
Debug.Log(requestURL);
|
||||||
|
|
||||||
string responseJson = request.downloadHandler.text;
|
string responseJson = request.downloadHandler.text;
|
||||||
T result = JsonConvert.DeserializeObject<T>(responseJson);
|
Base<T> result = JsonConvert.DeserializeObject<Base<T>>(responseJson);
|
||||||
return result;
|
return result.data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -298,10 +320,9 @@ namespace UVC.Networks
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private bool IsSuccess(UnityWebRequest.Result result)
|
private bool IsSuccess(UnityWebRequest.Result result)
|
||||||
{
|
{
|
||||||
return false;
|
|
||||||
|
|
||||||
switch(result)
|
switch(result)
|
||||||
{
|
{
|
||||||
case UnityWebRequest.Result.Success:
|
case UnityWebRequest.Result.Success:
|
||||||
|
|||||||
@@ -135,29 +135,33 @@ namespace Octopus.Simulator.Networks
|
|||||||
modelClass.description = "new model";
|
modelClass.description = "new model";
|
||||||
modelClass.data.info = jsonObject;
|
modelClass.data.info = jsonObject;
|
||||||
|
|
||||||
string requestAPI = $"{WebManager.Instance.apiConfig.model}";
|
|
||||||
Debug.Log(requestAPI);
|
|
||||||
if (string.IsNullOrEmpty(WebParameters.config.modelId))
|
if (string.IsNullOrEmpty(WebParameters.config.modelId))
|
||||||
{
|
{
|
||||||
WebManager.Instance.Request_Post(modelClass, requestAPI, (flag, value) =>
|
var requestURL = $"{WebManager.Instance.apiConfig.model}";
|
||||||
{
|
WebManager.Instance.Reqeust<WebModelReturnData>(requestURL, RequestType.POST, ModelCallback, modelClass);
|
||||||
if (flag)
|
|
||||||
{
|
//WebManager.Instance.Request_Post(modelClass, requestURL, (flag, value) =>
|
||||||
var webreturnClass = JsonConvert.DeserializeObject<WebModelReturnClass>(value);
|
//{
|
||||||
WebParameters.config.modelId = webreturnClass.data.insertedId.ToString();
|
// if (flag)
|
||||||
}
|
// {
|
||||||
});
|
// var webreturnClass = JsonConvert.DeserializeObject<WebModelReturnClass>(value);
|
||||||
|
// WebParameters.config.modelId = webreturnClass.data.insertedId.ToString();
|
||||||
|
// }
|
||||||
|
//});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WebManager.Instance.Request_Put(modelClass, $"{requestAPI}/{WebParameters.config.modelId}", (flag, value) =>
|
var requestURL = $"{WebManager.Instance.apiConfig.model}/{WebParameters.config.modelId}";
|
||||||
{
|
WebManager.Instance.Reqeust<WebModelReturnData>(requestURL, RequestType.PUT, ModelCallback, modelClass);
|
||||||
if (flag)
|
|
||||||
{
|
//WebManager.Instance.Request_Put(modelClass, requestURL, (flag, value) =>
|
||||||
var webreturnClass = JsonConvert.DeserializeObject<WebModelReturnClass>(value);
|
//{
|
||||||
WebParameters.config.modelId = webreturnClass.data.insertedId.ToString();
|
// if (flag)
|
||||||
}
|
// {
|
||||||
});
|
// var webreturnClass = JsonConvert.DeserializeObject<WebModelReturnClass>(value);
|
||||||
|
// WebParameters.config.modelId = webreturnClass.data.insertedId.ToString();
|
||||||
|
// }
|
||||||
|
//});
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
FileStream fileStream = new FileStream(string.Format("{0}.json", path), FileMode.Create);
|
FileStream fileStream = new FileStream(string.Format("{0}.json", path), FileMode.Create);
|
||||||
@@ -169,6 +173,11 @@ namespace Octopus.Simulator.Networks
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ModelCallback(WebModelReturnData response)
|
||||||
|
{
|
||||||
|
WebParameters.config.modelId = response.insertedId.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
public void Onclick_Load(string jsonData)
|
public void Onclick_Load(string jsonData)
|
||||||
{
|
{
|
||||||
List<SimulationModelInfo> loadInfos = new List<SimulationModelInfo>();
|
List<SimulationModelInfo> loadInfos = new List<SimulationModelInfo>();
|
||||||
@@ -197,7 +206,7 @@ namespace Octopus.Simulator.Networks
|
|||||||
|
|
||||||
DataManager.I.AddModel(spawnItem);
|
DataManager.I.AddModel(spawnItem);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(item.nodeID))
|
if (!string.IsNullOrEmpty(item.nodeID) && !loadModels.ContainsKey(item.nodeID))
|
||||||
loadModels.Add(item.nodeID, spawnItem);
|
loadModels.Add(item.nodeID, spawnItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user