1111
This commit is contained in:
8
Assets/00.StaryEvoTools/Resources.meta
Normal file
8
Assets/00.StaryEvoTools/Resources.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ccbc7ed554fef824a9ee69a0cfd8796c
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
12
Assets/00.StaryEvoTools/Resources/ArchitectureTemplate.txt
Normal file
12
Assets/00.StaryEvoTools/Resources/ArchitectureTemplate.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
namespace NamespaceX
|
||||||
|
{
|
||||||
|
public class ArchitectureX : Architecture<ArchitectureX>
|
||||||
|
{
|
||||||
|
protected override void Init()
|
||||||
|
{
|
||||||
|
//注册示例
|
||||||
|
//RegisterSystem<IScoreSystem>(new ScoreSystem());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 22a1686bb4c03114f8d6317f53c59182
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "MODULE_IDENT",
|
||||||
|
"rootNamespace": "ROOT_NAMESPACE",
|
||||||
|
"references": [
|
||||||
|
"GUID:d1a793c2b6959e04ea45b972eaa369c8",
|
||||||
|
"GUID:e34a5702dd353724aa315fb8011f08c3",
|
||||||
|
"GUID:4492e37c9663479418f9522cc4796b57"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": true,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": false,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4ed0e8f2a51e9f44fbcf6e6f44268289
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 39a67460f559484da2b52def8ff05571, type: 3}
|
||||||
|
m_Name: BuildAssetDataSetting
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
serializationData:
|
||||||
|
SerializedFormat: 2
|
||||||
|
SerializedBytes:
|
||||||
|
ReferencedUnityObjects: []
|
||||||
|
SerializedBytesString:
|
||||||
|
Prefab: {fileID: 0}
|
||||||
|
PrefabModificationsReferencedUnityObjects: []
|
||||||
|
PrefabModifications: []
|
||||||
|
SerializationNodes: []
|
||||||
|
packageName: J0001
|
||||||
|
packageVersionX: 1
|
||||||
|
packageVersionY: 0
|
||||||
|
packageVersionZ: 0
|
||||||
|
environmentType: 1
|
||||||
|
selectedBuildPipelines: 1
|
||||||
|
packageVersion: 1.0.0
|
||||||
|
VersionType: 0
|
||||||
|
viewer:
|
||||||
|
clearBuildCacheToggle: 0
|
||||||
|
useAssetDependencyDBToggle: 1
|
||||||
|
copyBuildinFileOption: 1
|
||||||
|
copyBuildinFileParams:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 66454a350a7efd5438a4438e4d769985
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
48
Assets/00.StaryEvoTools/Resources/DomainTemplate.txt
Normal file
48
Assets/00.StaryEvoTools/Resources/DomainTemplate.txt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Stary.Evo;
|
||||||
|
using UnityEngine;
|
||||||
|
namespace NamespaceX
|
||||||
|
{
|
||||||
|
public class ClassNameXX :DomainBase,IController
|
||||||
|
{
|
||||||
|
public override void OnEnter(string param)
|
||||||
|
{
|
||||||
|
base.OnEnter(param);
|
||||||
|
Debug.Log("UnityEvo: OnEnter进入成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnExit()
|
||||||
|
{
|
||||||
|
base.OnExit();
|
||||||
|
GetArchitecture().Dispose();
|
||||||
|
Debug.Log("UnityEvo: OnExit退出成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Task OnEnterAsync(string param)
|
||||||
|
{
|
||||||
|
Debug.Log("UnityEvo: OnEnterAsync进入成功");
|
||||||
|
return base.OnEnterAsync(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Task OnExitAsync()
|
||||||
|
{
|
||||||
|
Debug.Log("UnityEvo: OnEnterAsync退出成功");
|
||||||
|
return base.OnExitAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IArchitecture GetArchitecture()
|
||||||
|
{
|
||||||
|
return ReturnArchitecture.Interface;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ArchitectureX : Architecture<ArchitectureX>
|
||||||
|
{
|
||||||
|
protected override void Init()
|
||||||
|
{
|
||||||
|
//注册示例
|
||||||
|
//RegisterSystem<IScoreSystem>(new ScoreSystem());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b5740491cc9ff6144a981e256e3eb8b7
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
339
Assets/00.StaryEvoTools/Resources/ProgressBarPanel.prefab
Normal file
339
Assets/00.StaryEvoTools/Resources/ProgressBarPanel.prefab
Normal file
@@ -0,0 +1,339 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4567782109512309038
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4160048210915643038}
|
||||||
|
- component: {fileID: 825865997535607830}
|
||||||
|
- component: {fileID: 2727479573709789859}
|
||||||
|
- component: {fileID: 635877910647768279}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ProgressBarPanel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4160048210915643038
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4567782109512309038}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 2}
|
||||||
|
m_LocalScale: {x: 0.0042, y: 0.0042, z: 0.0042}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 3019045779189427444}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 200, y: 200}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!223 &825865997535607830
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4567782109512309038}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 2
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_VertexColorAlwaysGammaSpace: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
|
m_UpdateRectTransformForStandalone: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &2727479573709789859
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4567782109512309038}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 1
|
||||||
|
--- !u!114 &635877910647768279
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4567782109512309038}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 55
|
||||||
|
--- !u!1 &5926684121426958632
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3019045779189427444}
|
||||||
|
- component: {fileID: 5861308620308585849}
|
||||||
|
- component: {fileID: 4575314728117427798}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Fill
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &3019045779189427444
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5926684121426958632}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4478887775470361833}
|
||||||
|
- {fileID: 7061587243420078504}
|
||||||
|
m_Father: {fileID: 4160048210915643038}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5861308620308585849
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5926684121426958632}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &4575314728117427798
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5926684121426958632}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 3
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!1 &5969878386391244675
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4478887775470361833}
|
||||||
|
- component: {fileID: 407484292974360126}
|
||||||
|
- component: {fileID: 5313000614588967778}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: FillMessage
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4478887775470361833
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5969878386391244675}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 3019045779189427444}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 135.3}
|
||||||
|
m_SizeDelta: {x: 0, y: -129.5}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &407484292974360126
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5969878386391244675}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &5313000614588967778
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5969878386391244675}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 40
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 1
|
||||||
|
m_MaxSize: 60
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: "\u89E3\u538B\u4E2D"
|
||||||
|
--- !u!1 &8961881545791775599
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7061587243420078504}
|
||||||
|
- component: {fileID: 1247723116626350990}
|
||||||
|
- component: {fileID: 5156535828674891212}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: FillText
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7061587243420078504
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8961881545791775599}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 3019045779189427444}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &1247723116626350990
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8961881545791775599}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &5156535828674891212
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8961881545791775599}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 40
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 1
|
||||||
|
m_MaxSize: 60
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: 100%
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d87b9e3e2dc41aa4898709518fd471ff
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -18,6 +18,8 @@ namespace Stary.Evo
|
|||||||
public GameObject mainPrefab;
|
public GameObject mainPrefab;
|
||||||
private DomainConfig domainConfig;
|
private DomainConfig domainConfig;
|
||||||
|
|
||||||
|
private string _sceneName;
|
||||||
|
|
||||||
public LoadResState(IFsmSystemAsync system) : base(system)
|
public LoadResState(IFsmSystemAsync system) : base(system)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -44,7 +46,7 @@ namespace Stary.Evo
|
|||||||
{
|
{
|
||||||
case DomainConfig.LoadResType.Prefab:
|
case DomainConfig.LoadResType.Prefab:
|
||||||
|
|
||||||
LoadDomainPrefab(package);
|
await LoadDomainPrefab(package);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DomainConfig.LoadResType.Scene:
|
case DomainConfig.LoadResType.Scene:
|
||||||
@@ -53,48 +55,52 @@ namespace Stary.Evo
|
|||||||
var physicsMode = LocalPhysicsMode.None;
|
var physicsMode = LocalPhysicsMode.None;
|
||||||
SceneHandle handle = package.LoadSceneAsync(domainConfig.mainScene, sceneMode, physicsMode);
|
SceneHandle handle = package.LoadSceneAsync(domainConfig.mainScene, sceneMode, physicsMode);
|
||||||
await handle;
|
await handle;
|
||||||
Scene targetScene = SceneManager.GetSceneByName(domainConfig.mainScene);
|
|
||||||
targetScene.name = domainConfig.mainScene;
|
Scene targetScene = SceneManager.GetSceneByName(handle.SceneName);
|
||||||
|
// targetScene.name = domainConfig.mainScene;
|
||||||
// 设置为 active scene 或者后续 Move 到该 scene
|
// 设置为 active scene 或者后续 Move 到该 scene
|
||||||
SceneManager.SetActiveScene(targetScene);
|
SceneManager.SetActiveScene(targetScene);
|
||||||
|
_sceneName = targetScene.name;
|
||||||
mainPrefab = GameObject.Find(domainConfig.mainPrefab);
|
mainPrefab = GameObject.Find(domainConfig.mainPrefab);
|
||||||
if (mainPrefab == null)
|
if (mainPrefab == null)
|
||||||
{
|
{
|
||||||
LoadDomainPrefab(package);
|
await LoadDomainPrefab(package);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (domainConfig.domain != "Main")
|
||||||
LocalTransformInfo info = mainPrefab.GetOrAddComponent<LocalTransformInfo>();
|
|
||||||
FsmLoadSystem fsmLoadSystem = FsmSystem as FsmLoadSystem;
|
|
||||||
|
|
||||||
if (info._list.Count >= 2)
|
|
||||||
{
|
{
|
||||||
if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.PointCloud)
|
LocalTransformInfo info = mainPrefab.GetOrAddComponent<LocalTransformInfo>();
|
||||||
|
FsmLoadSystem fsmLoadSystem = FsmSystem as FsmLoadSystem;
|
||||||
|
|
||||||
|
if (info._list.Count >= 2)
|
||||||
{
|
{
|
||||||
info.Switch(1);
|
if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.PointCloud)
|
||||||
}
|
{
|
||||||
else if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.VIOICE)
|
info.Switch(1);
|
||||||
{
|
}
|
||||||
info.Switch(0);
|
else if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.VIOICE)
|
||||||
}
|
{
|
||||||
else if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.ImageTracked)
|
info.Switch(0);
|
||||||
{
|
}
|
||||||
info.transform.position = fsmLoadSystem.GetTransformCtor().position;
|
else if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.ImageTracked)
|
||||||
info.transform.rotation = Quaternion.Euler(fsmLoadSystem.GetTransformCtor().rotation);
|
{
|
||||||
info.transform.localScale = fsmLoadSystem.GetTransformCtor().scale;
|
info.transform.position = fsmLoadSystem.GetTransformCtor().position;
|
||||||
|
info.transform.rotation = Quaternion.Euler(fsmLoadSystem.GetTransformCtor().rotation);
|
||||||
|
info.transform.localScale = fsmLoadSystem.GetTransformCtor().scale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
info.Switch(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
info.Switch(0);
|
Debug.LogError($"UnityEvo:{mainPrefab.name}的TransformInfo长度小于2,无法继续运行,请排查");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.LogError($"UnityEvo:{mainPrefab.name}的TransformInfo长度小于2,无法继续运行,请排查");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mainPrefab != null)
|
if (mainPrefab != null)
|
||||||
{
|
{
|
||||||
@@ -123,7 +129,7 @@ namespace Stary.Evo
|
|||||||
base.OnUpdate();
|
base.OnUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadDomainPrefab(ResourcePackage package)
|
private async UniTask LoadDomainPrefab(ResourcePackage package)
|
||||||
{
|
{
|
||||||
// 加载热更资源
|
// 加载热更资源
|
||||||
var loadOperation = package.LoadAssetAsync<GameObject>(domainConfig.mainPrefab);
|
var loadOperation = package.LoadAssetAsync<GameObject>(domainConfig.mainPrefab);
|
||||||
@@ -155,7 +161,7 @@ namespace Stary.Evo
|
|||||||
Debug.Log("UnityEvo:Domain退出...");
|
Debug.Log("UnityEvo:Domain退出...");
|
||||||
if (domainConfig.domain != "Main")
|
if (domainConfig.domain != "Main")
|
||||||
{
|
{
|
||||||
DomainBase domainBase = mainPrefab.GetComponent<DomainBase>();
|
DomainBase domainBase = mainPrefab.GetOrAddComponent<DomainBase>();
|
||||||
if (domainBase == null)
|
if (domainBase == null)
|
||||||
{
|
{
|
||||||
Debug.LogError($"UnityEvo:{mainPrefab.name}的DomainBase为空,无法退出,请排查");
|
Debug.LogError($"UnityEvo:{mainPrefab.name}的DomainBase为空,无法退出,请排查");
|
||||||
@@ -165,18 +171,17 @@ namespace Stary.Evo
|
|||||||
domainBase.OnExit();
|
domainBase.OnExit();
|
||||||
await domainBase.OnExitAsync();
|
await domainBase.OnExitAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadResType == DomainConfig.LoadResType.Scene)
|
|
||||||
{
|
|
||||||
await SceneManager.UnloadSceneAsync(domainConfig.mainScene);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (domainBase != null)
|
if (domainBase != null)
|
||||||
{
|
{
|
||||||
GameObject.Destroy(domainBase.gameObject);
|
GameObject.Destroy(domainBase.gameObject);
|
||||||
|
|
||||||
await ForceUnloadAllAssets(domainBase.DomainName);
|
await ForceUnloadAllAssets(domainBase.DomainName);
|
||||||
}
|
}
|
||||||
|
if (loadResType == DomainConfig.LoadResType.Scene)
|
||||||
|
{
|
||||||
|
await SceneManager.UnloadSceneAsync(_sceneName);
|
||||||
|
}
|
||||||
|
AppConfig.PackageDomainName = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -240,10 +240,14 @@ namespace Stary.Evo
|
|||||||
public async UniTask Download(string fileId)
|
public async UniTask Download(string fileId)
|
||||||
{
|
{
|
||||||
// 在任意MonoBehaviour或DomainBase派生类中
|
// 在任意MonoBehaviour或DomainBase派生类中
|
||||||
string loadPath = $"{Application.persistentDataPath}/DownloadedContent/{AppConfig.PackageDomainName}";
|
string loadPath = Path.Combine(Application.temporaryCachePath, "DownloadedContent",
|
||||||
|
AppConfig.PackageDomainName);
|
||||||
|
//string loadPath = $"{Application.persistentDataPath}/DownloadedContent/{AppConfig.PackageDomainName}";
|
||||||
if (Directory.Exists(loadPath))
|
if (Directory.Exists(loadPath))
|
||||||
{
|
{
|
||||||
Directory.Delete(loadPath, true);
|
Directory.Delete(loadPath, true);
|
||||||
|
// 等一帧,让系统真正释放句柄
|
||||||
|
await UniTask.DelayFrame(1);
|
||||||
}
|
}
|
||||||
FsmLoadSystem loadSystem =FsmSystem as FsmLoadSystem;
|
FsmLoadSystem loadSystem =FsmSystem as FsmLoadSystem;
|
||||||
if (loadSystem.ProgressBarPanel == null)
|
if (loadSystem.ProgressBarPanel == null)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Stary.Evo
|
|||||||
{
|
{
|
||||||
var initParameters = new OfflinePlayModeParameters();
|
var initParameters = new OfflinePlayModeParameters();
|
||||||
var buildinFileSystemParams = FileSystemParameters.CreateDefaultBuildinFileSystemParameters(null,
|
var buildinFileSystemParams = FileSystemParameters.CreateDefaultBuildinFileSystemParameters(null,
|
||||||
$"{Application.persistentDataPath}/DownloadedContent/{AppConfig.PackageDomainName}");
|
$"{Application.temporaryCachePath}/DownloadedContent/{AppConfig.PackageDomainName}");
|
||||||
buildinFileSystemParams.AddParameter(FileSystemParametersDefine.APPEND_FILE_EXTENSION, true);
|
buildinFileSystemParams.AddParameter(FileSystemParametersDefine.APPEND_FILE_EXTENSION, true);
|
||||||
buildinFileSystemParams.AddParameter(FileSystemParametersDefine.COPY_BUILDIN_PACKAGE_MANIFEST, true);
|
buildinFileSystemParams.AddParameter(FileSystemParametersDefine.COPY_BUILDIN_PACKAGE_MANIFEST, true);
|
||||||
initParameters.BuildinFileSystemParameters = buildinFileSystemParams;
|
initParameters.BuildinFileSystemParameters = buildinFileSystemParams;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
using System.Threading;
|
||||||
using Cysharp.Threading.Tasks;
|
using Cysharp.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
@@ -10,6 +11,7 @@ namespace Stary.Evo
|
|||||||
{
|
{
|
||||||
public class ZipTool
|
public class ZipTool
|
||||||
{
|
{
|
||||||
|
private static SemaphoreSlim unzipLock = new(1, 1);
|
||||||
// 新增:带进度回调的下载解压方法
|
// 新增:带进度回调的下载解压方法
|
||||||
public static async UniTask DownloadAndUnzipAsync(string fildId, string extractPath,
|
public static async UniTask DownloadAndUnzipAsync(string fildId, string extractPath,
|
||||||
Action<float> downloadProgress = null, Action<float> unzipProgress = null)
|
Action<float> downloadProgress = null, Action<float> unzipProgress = null)
|
||||||
@@ -41,7 +43,9 @@ namespace Stary.Evo
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// 验证路径安全性
|
||||||
|
string fullExtractPath = Path.GetFullPath(extractPath);
|
||||||
|
|
||||||
using (ZipArchive archive = ZipFile.OpenRead(zipPath))
|
using (ZipArchive archive = ZipFile.OpenRead(zipPath))
|
||||||
{
|
{
|
||||||
float totalEntries = archive.Entries.Count;
|
float totalEntries = archive.Entries.Count;
|
||||||
@@ -49,7 +53,13 @@ namespace Stary.Evo
|
|||||||
|
|
||||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||||
{
|
{
|
||||||
string filePath = Path.Combine(extractPath, entry.FullName);
|
// 安全检查:防止目录遍历
|
||||||
|
string filePath = Path.GetFullPath(Path.Combine(extractPath, entry.FullName));
|
||||||
|
if (!filePath.StartsWith(fullExtractPath))
|
||||||
|
{
|
||||||
|
Debug.LogWarning($"跳过不安全的文件路径: {entry.FullName}");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
|
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(entry.Name))
|
if (!string.IsNullOrEmpty(entry.Name))
|
||||||
@@ -57,7 +67,7 @@ namespace Stary.Evo
|
|||||||
using (Stream inputStream = entry.Open())
|
using (Stream inputStream = entry.Open())
|
||||||
using (FileStream outputStream = File.Create(filePath))
|
using (FileStream outputStream = File.Create(filePath))
|
||||||
{
|
{
|
||||||
await inputStream.CopyToAsync(outputStream);
|
await inputStream.CopyToAsync(outputStream,81920);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +81,7 @@ namespace Stary.Evo
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.LogError($"解压失败: {ex.Message}");
|
Debug.LogError($"解压失败: {ex.Message}");
|
||||||
throw;
|
throw; // 重新抛出异常让调用方处理
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.staryevo.tools",
|
"name": "com.staryevo.tools",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6",
|
||||||
"displayName": "00.StaryEvo.Tools",
|
"displayName": "00.StaryEvo.Tools",
|
||||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user