From c37b5e52ac8329d01c7567e62b82204db7702383 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 3 Nov 2022 15:21:03 +0800 Subject: [PATCH] Update basic sample --- .../GameRes/Scene/GameScene1.unity | 133 +-------- .../GameRes/UIPanel/ui_image.prefab | 77 ++++++ ...ndow2.prefab.meta => ui_image.prefab.meta} | 2 +- .../GameRes/UIPanel/ui_window.prefab | 38 +-- .../GameRes/UIPanel/ui_window2.prefab | 253 ------------------ .../GameScript/Runtime/Behaviours/Spawner.cs | 14 + .../Runtime/Behaviours/Spawner.cs.meta | 11 + .../GameScript/Runtime/GameScene1.cs | 6 + .../AssetBundleCollectorSetting.asset | 2 +- 9 files changed, 117 insertions(+), 419 deletions(-) create mode 100644 Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab rename Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/{ui_window2.prefab.meta => ui_image.prefab.meta} (74%) delete mode 100644 Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab create mode 100644 Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs create mode 100644 Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs.meta diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameRes/Scene/GameScene1.unity b/Assets/YooAsset/Samples~/Basic Sample/GameRes/Scene/GameScene1.unity index d50442c..181893e 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameRes/Scene/GameScene1.unity +++ b/Assets/YooAsset/Samples~/Basic Sample/GameRes/Scene/GameScene1.unity @@ -834,7 +834,6 @@ RectTransform: - {fileID: 851382668} - {fileID: 1728630126} - {fileID: 2140485207} - - {fileID: 1410518846} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2178,136 +2177,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1391355263} m_CullTransparentMesh: 1 ---- !u!1001 &1410518845 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 421995327} - m_Modifications: - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_RootOrder - value: 12 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3898752365573652967, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_Name - value: window - objectReference: {fileID: 0} - - target: {fileID: 3898752365573652967, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: c960f31742c5ef84dadfc5324f497dc4, type: 3} ---- !u!224 &1410518846 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 2022112446042523657, guid: c960f31742c5ef84dadfc5324f497dc4, - type: 3} - m_PrefabInstance: {fileID: 1410518845} - m_PrefabAsset: {fileID: 0} --- !u!1 &1495202955 GameObject: m_ObjectHideFlags: 0 @@ -2805,7 +2674,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -167.48999, y: 52.58} + m_AnchoredPosition: {x: -167.48999, y: 52.580017} m_SizeDelta: {x: 250, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1728630127 diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab new file mode 100644 index 0000000..308cae3 --- /dev/null +++ b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4823021703421310622 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1081569295705771379} + - component: {fileID: 717313983029069870} + - component: {fileID: 4531530829655932529} + m_Layer: 5 + m_Name: ui_image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1081569295705771379 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4823021703421310622} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &717313983029069870 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4823021703421310622} + m_CullTransparentMesh: 1 +--- !u!114 &4531530829655932529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4823021703421310622} + 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: 21300000, guid: e7478af3e19f2754186cf50b9fcc82aa, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab.meta b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab.meta similarity index 74% rename from Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab.meta rename to Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab.meta index 7e9f164..f3d6ad8 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab.meta +++ b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_image.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e4f6646a8e92fec4e926ffb00efae2a6 +guid: 3bbebf8c65a9a384fb40cb989ad1a43b PrefabImporter: externalObjects: {} userData: diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window.prefab b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window.prefab index 42415d9..f55a3c8 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window.prefab +++ b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window.prefab @@ -9,10 +9,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1379288801} - - component: {fileID: 1379288803} - - component: {fileID: 1379288802} + - component: {fileID: 1100654191310277548} m_Layer: 5 - m_Name: Image + m_Name: Spawn m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -37,15 +36,7 @@ RectTransform: m_AnchoredPosition: {x: 156.2, y: -180} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1379288803 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1379288800} - m_CullTransparentMesh: 1 ---- !u!114 &1379288802 +--- !u!114 &1100654191310277548 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -54,27 +45,10 @@ MonoBehaviour: m_GameObject: {fileID: 1379288800} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: be3e0c14618d8ac4fa7687c9e5a1fe15, 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: 21300000, guid: e7478af3e19f2754186cf50b9fcc82aa, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 + SpawnGo: {fileID: 4823021703421310622, guid: 3bbebf8c65a9a384fb40cb989ad1a43b, type: 3} --- !u!1 &3898752365573652967 GameObject: m_ObjectHideFlags: 0 @@ -88,7 +62,7 @@ GameObject: - component: {fileID: 3845261542565316829} - component: {fileID: 6765875055818979782} m_Layer: 5 - m_Name: window + m_Name: ui_window m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab b/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab deleted file mode 100644 index 5cb8df2..0000000 --- a/Assets/YooAsset/Samples~/Basic Sample/GameRes/UIPanel/ui_window2.prefab +++ /dev/null @@ -1,253 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1379288800 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1379288801} - - component: {fileID: 1379288803} - - component: {fileID: 1379288802} - m_Layer: 5 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1379288801 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1379288800} - 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_Children: [] - m_Father: {fileID: 2022112446042523657} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 156.2, y: -180} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1379288803 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1379288800} - m_CullTransparentMesh: 1 ---- !u!114 &1379288802 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1379288800} - 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: 21300000, guid: e7478af3e19f2754186cf50b9fcc82aa, type: 3} - m_Type: 0 - 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 &3898752365573652967 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2022112446042523657} - - component: {fileID: 3819679245741158711} - - component: {fileID: 3845261542565316829} - - component: {fileID: 6765875055818979782} - m_Layer: 5 - m_Name: window2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2022112446042523657 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3898752365573652967} - 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_Children: - - {fileID: 1939154922710681327} - - {fileID: 1379288801} - m_Father: {fileID: 0} - m_RootOrder: 0 - 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!223 &3819679245741158711 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3898752365573652967} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &3845261542565316829 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3898752365573652967} - 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: 0 ---- !u!114 &6765875055818979782 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3898752365573652967} - 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: 4294967295 ---- !u!1 &6270437865016065282 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1939154922710681327} - - component: {fileID: 2026527403895129010} - - component: {fileID: 3101003136597407213} - m_Layer: 5 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1939154922710681327 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6270437865016065282} - 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_Children: [] - m_Father: {fileID: 2022112446042523657} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -180} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2026527403895129010 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6270437865016065282} - m_CullTransparentMesh: 1 ---- !u!114 &3101003136597407213 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6270437865016065282} - 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: 21300000, guid: 145b173105dad2d44a8c243a25f27147, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs new file mode 100644 index 0000000..490970c --- /dev/null +++ b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Spawner : MonoBehaviour +{ + public GameObject SpawnGo; + + void Start() + { + UnityEngine.Debug.Log("ʼƹصGameObject"); + GameObject.Instantiate(SpawnGo, this.transform); + } +} \ No newline at end of file diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs.meta b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs.meta new file mode 100644 index 0000000..33e2ade --- /dev/null +++ b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/Behaviours/Spawner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: be3e0c14618d8ac4fa7687c9e5a1fe15 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/GameScene1.cs b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/GameScene1.cs index 9ed60d7..d41c283 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/GameScene1.cs +++ b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/GameScene1.cs @@ -190,6 +190,12 @@ public class GameScene1 : MonoBehaviour YooAssets.LoadSceneAsync("GameScene2"); }); } + + // 加载面板 + { + var handle = YooAssets.LoadAssetSync("ui_window"); + handle.InstantiateSync(CanvasRoot.transform); + } } private void OnUnityAtlas_Completed(AssetOperationHandle handle) diff --git a/Assets/YooAsset/Samples~/Basic Sample/YooAssetSetting/AssetBundleCollectorSetting.asset b/Assets/YooAsset/Samples~/Basic Sample/YooAssetSetting/AssetBundleCollectorSetting.asset index aab4f62..0ae4533 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/YooAssetSetting/AssetBundleCollectorSetting.asset +++ b/Assets/YooAsset/Samples~/Basic Sample/YooAssetSetting/AssetBundleCollectorSetting.asset @@ -87,7 +87,7 @@ MonoBehaviour: CollectorGUID: 926d3203fcefdb947881a7491496e039 CollectorType: 0 AddressRuleName: AddressByFileName - PackRuleName: PackDirectory + PackRuleName: PackSeparately FilterRuleName: CollectAll AssetTags: - CollectPath: Assets/Samples/Basic Sample/GameRes/UISprite