浏览代码

Merge pull request #30 from UnityTechnologies/store

Store functionality added
/AdsTesting
GitHub 3 年前
当前提交
fa209161
共有 13 个文件被更改,包括 429 次插入235 次删除
  1. 1
      Assets/Prefabs/Player.prefab
  2. 338
      Assets/Scenes/Store.unity
  3. 2
      Assets/ScriptableObjects/GameManager.asset
  4. 6
      Assets/Scripts/GameManagerSO.cs
  5. 11
      Assets/Scripts/PlayerConfigurator.cs
  6. 96
      Assets/Scripts/Store.cs
  7. 12
      UserSettings/EditorUserSettings.asset
  8. 147
      Assets/Prefabs/Dino_Store Variant.prefab
  9. 7
      Assets/Prefabs/Dino_Store Variant.prefab.meta
  10. 8
      Assets/Scripts/Tools.meta
  11. 25
      Assets/Scripts/Tools/CacheUtilities.cs
  12. 11
      Assets/Scripts/Tools/CacheUtilities.cs.meta

1
Assets/Prefabs/Player.prefab


m_Name:
m_EditorClassIdentifier:
m_HatAnchor: {fileID: 1946178409}
m_GameManager: {fileID: 11400000, guid: a9f6da264584558478e57f0d26b9befb, type: 2}
--- !u!114 &8083381679980500539
MonoBehaviour:
m_ObjectHideFlags: 0

338
Assets/Scenes/Store.unity


debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &54429516
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 54429518}
- component: {fileID: 54429517}
m_Layer: 0
m_Name: Directional Light (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &54429517
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 54429516}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 0.3700605, g: 0.6119434, b: 0.7924528, a: 1}
m_Intensity: 3.02
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 1
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 1e-45, w: NaN}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &54429518
--- !u!4 &99641490 stripped
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
m_PrefabInstance: {fileID: 7666923424395896686}
m_GameObject: {fileID: 54429516}
m_LocalRotation: {x: -0.501857, y: 0.8202635, z: -0.27116284, w: -0.042168465}
m_LocalPosition: {x: -2.46, y: 0.19, z: -16.2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 29.155, y: 166.559, z: -66.429}
--- !u!1 &160763019
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_IgnoreReversedGraphics: 0
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2

- {fileID: 182229753}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: -15.259, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: -25.074, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}

m_LeftArrowButton: {fileID: 1427757661}
m_RightArrowButton: {fileID: 1893815542}
m_GameManager: {fileID: 11400000, guid: a9f6da264584558478e57f0d26b9befb, type: 2}
m_HatAttachPoint: {fileID: 99641490}
--- !u!1 &1265336762
GameObject:
m_ObjectHideFlags: 0

y: 0
width: 1
height: 1
near clip plane: 0.3
near clip plane: 4.15
far clip plane: 1000
field of view: 43.1
orthographic: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1265336762}
m_LocalRotation: {x: 0.13218592, y: -0, z: -0, w: 0.99122494}
m_LocalPosition: {x: 0.1, y: 4.12, z: -22.37}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 4.12, z: -22.37}
m_LocalEulerAnglesHint: {x: 15.192, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1265336766
MonoBehaviour:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1427757659
GameObject:

m_TargetGraphic: {fileID: 1427757662}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1140220496}
m_TargetAssemblyTypeName: Store, Assembly-CSharp
m_MethodName: PreviousHat
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1427757662
MonoBehaviour:
m_ObjectHideFlags: 0

m_TargetGraphic: {fileID: 1893815543}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1140220496}
m_TargetAssemblyTypeName: Store, Assembly-CSharp
m_MethodName: NextHat
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1893815543
MonoBehaviour:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1893815540}
m_CullTransparentMesh: 0
--- !u!1001 &1966409484
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalScale.x
value: 1.7941301
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalScale.y
value: 1.7941301
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalScale.z
value: 1.7941301
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalPosition.y
value: -2.0800216
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalPosition.z
value: -10.0020275
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.9943846
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.105826765
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 12.150001
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180.00002
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_Name
value: Dino
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9f5858cf2c3ec59428254c8fff5e9130, type: 3}
--- !u!1 &1973109021
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2018716878}
m_CullTransparentMesh: 0
--- !u!1 &2023127985 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
m_PrefabInstance: {fileID: 1966409484}
m_PrefabAsset: {fileID: 0}
--- !u!95 &2023127987
Animator:
serializedVersion: 3
--- !u!1001 &7666923424395896686
PrefabInstance:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2023127985}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 67370538fb35c754ba6f64bd4fe3e9a3, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31, type: 3}
propertyPath: m_LocalPosition.x
value: -0.083
objectReference: {fileID: 0}
- target: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31, type: 3}
propertyPath: m_LocalPosition.y
value: 0.73
objectReference: {fileID: 0}
- target: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31, type: 3}
propertyPath: m_LocalPosition.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 99641490, guid: 1231a5a0b4836214eac976942422be31, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 7396894013401668915, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_Name
value: Dino_Store
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.721
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalPosition.z
value: -10.0020275
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.9943846
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.105826765
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 12.150001
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180.00002
objectReference: {fileID: 0}
- target: {fileID: 7920946941363832713, guid: 1231a5a0b4836214eac976942422be31,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1231a5a0b4836214eac976942422be31, type: 3}

2
Assets/ScriptableObjects/GameManager.asset


m_EditorClassIdentifier:
s_CurrentLevel: 0
s_MaxAvailableLevel: 4
s_ActiveHat: 0
s_ActiveHat: -1

6
Assets/Scripts/GameManagerSO.cs


// The value of -1 means no hats have been purchased
public int s_ActiveHat = -1;
public void OnEnable()
{
// When we go to the
s_CurrentLevel = 0;
}
public void ExitGame()
{
s_CurrentLevel = 0;

11
Assets/Scripts/PlayerConfigurator.cs


[SerializeField]
private Transform m_HatAnchor;
[SerializeField]
private GameManagerSO m_GameManager;
// At the moment, we randomly assign a Hat, but ideally, we have the unlocked hat property saved
SetHat(string.Format("Hat{0:00}", UnityEngine.Random.Range(0, 4)));
// TODO: Implement a m_GameManager.HatsUnlocked method on the GameManager script
//If the condition is met, then a hat has been unlocked
if(m_GameManager.s_ActiveHat >= 0)
{
SetHat(string.Format("Hat{0:00}", m_GameManager.s_ActiveHat));
}
}
// TODO: Change the string parameter

96
Assets/Scripts/Store.cs


using UnityEngine.UI;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using System;
public class Store : MonoBehaviour
{

[SerializeField]
private GameManagerSO m_GameManager;
private AsyncOperationHandle m_HatsHandle;
[SerializeField]
private Transform m_HatAttachPoint;
private AsyncOperationHandle m_DownloadHatsHandle;
private AsyncOperationHandle m_HatHandle;
if(m_GameManager.s_ActiveHat >= 0)
{
ShowHatSelectionUI();
m_HatHandle = Addressables.InstantiateAsync("Hat0" + m_GameManager.s_ActiveHat, m_HatAttachPoint);
}
m_HatsHandle = Addressables.DownloadDependenciesAsync("Hat00");
m_DownloadHatsHandle = Addressables.DownloadDependenciesAsync("Hat00");
m_HatsHandle.Completed += OnHatsDownloaded;
m_DownloadHatsHandle.Completed += OnHatsDownloaded;
if(m_HatsHandle.Status == AsyncOperationStatus.Succeeded)
if(m_DownloadHatsHandle.Status == AsyncOperationStatus.Succeeded)
// TODO: Avoid assigning directly the int to the gamemanager property
Addressables.InstantiateAsync("Hat0" + m_GameManager.s_ActiveHat);
//Hide the Purchase Button
m_BuyHatsButton.gameObject.SetActive(false);
//Show the clear cache button to remove the apps and purge the Addressables cache
m_ClearCacheButton.gameObject.SetActive(true);
m_HatHandle = Addressables.InstantiateAsync("Hat0" + m_GameManager.s_ActiveHat, m_HatAttachPoint);
// Show the arrow buttons
m_LeftArrowButton.gameObject.SetActive(true);
m_RightArrowButton.gameObject.SetActive(true);
ShowHatSelectionUI();
m_HatsHandle.Completed -= OnHatsDownloaded;
m_DownloadHatsHandle.Completed -= OnHatsDownloaded;
// Clear the current selected hat
Addressables.ReleaseInstance(m_HatHandle);
if(m_GameManager.s_ActiveHat < 3)
{
++m_GameManager.s_ActiveHat;
}
else
{
m_GameManager.s_ActiveHat = 0;
}
m_HatHandle = Addressables.InstantiateAsync("Hat0" + m_GameManager.s_ActiveHat, m_HatAttachPoint);
// Clear the current selected hat
Addressables.ReleaseInstance(m_HatHandle);
if (m_GameManager.s_ActiveHat > 1)
{
--m_GameManager.s_ActiveHat;
}
else
{
m_GameManager.s_ActiveHat = 3;
}
m_HatHandle = Addressables.InstantiateAsync("Hat0" + m_GameManager.s_ActiveHat, m_HatAttachPoint);
}
public void ClearAddressablesCache()

Debug.Log("Cleared Cache Successfully");
// Reload the scene or destroy the game object
// Reset the hat
m_GameManager.s_ActiveHat = -1;
HideHatSelectionUI();
//TODO: Reload the scene or destroy the game object
Addressables.ReleaseInstance(m_HatHandle);
}
private void ShowHatSelectionUI()
{
//Hide the Purchase Button
m_BuyHatsButton.gameObject.SetActive(false);
//Show the clear cache button to remove the apps and purge the Addressables cache
m_ClearCacheButton.gameObject.SetActive(true);
// Show the arrow buttons
m_LeftArrowButton.gameObject.SetActive(true);
m_RightArrowButton.gameObject.SetActive(true);
}
private void HideHatSelectionUI()
{
// Show the Purchase Button
m_BuyHatsButton.gameObject.SetActive(true);
// Hide the clear cache button to remove the apps and purge the Addressables cache
m_ClearCacheButton.gameObject.SetActive(false);
// Hide the arrow buttons
m_LeftArrowButton.gameObject.SetActive(false);
m_RightArrowButton.gameObject.SetActive(false);
}
}

12
UserSettings/EditorUserSettings.asset


serializedVersion: 4
m_ConfigSettings:
RecentlyUsedScenePath-0:
value: 22424703114646680e0b0227036c6c0419051d6439262f2434
value: 22424703114646680e0b0227036c7315001214157c7a68252320092a
value: 22424703114646680e0b0227036c7315001214157c7a68252320092a
value: 22424703114646680e0b0227036c7315001214157c7968252320092a
value: 22424703114646680e0b0227036c7315001214157c7968252320092a
value: 22424703114646680e0b0227036c7315001214157c7b68252320092a
value: 22424703114646680e0b0227036c7315001214157c7b68252320092a
value: 22424703114646680e0b0227036c731f171311242b1b2535232c5326ece92021
value: 22424703114646680e0b0227036c731f171311242b1b2535232c5326ece92021
value: 22424703114646680e0b0227036c7315001214157c7868252320092a
value: 22424703114646680e0b0227036c7315001214157c7868252320092a
value: 22424703114646680e0b0227036c6c0419051d6439262f2434
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650

147
Assets/Prefabs/Dino_Store Variant.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &99641489
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 99641490}
m_Layer: 0
m_Name: Hat Attach Point
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &99641490
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 99641489}
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: 2822599031909793820}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &2023127987
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7396894013401668915}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 67370538fb35c754ba6f64bd4fe3e9a3, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1001 &7666923424576970850
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalScale.x
value: 1.7941301
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalScale.y
value: 1.7941301
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalScale.z
value: 1.7941301
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalPosition.y
value: -2.0800216
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalPosition.z
value: -10.0020275
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.9943846
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.105826765
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 12.150001
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180.00002
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
propertyPath: m_Name
value: Dino_Store
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9f5858cf2c3ec59428254c8fff5e9130, type: 3}
--- !u!1 &7396894013401668915 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
m_PrefabInstance: {fileID: 7666923424576970850}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2822599031909793820 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5570250042315399294, guid: 9f5858cf2c3ec59428254c8fff5e9130,
type: 3}
m_PrefabInstance: {fileID: 7666923424576970850}
m_PrefabAsset: {fileID: 0}

7
Assets/Prefabs/Dino_Store Variant.prefab.meta


fileFormatVersion: 2
guid: 1231a5a0b4836214eac976942422be31
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts/Tools.meta


fileFormatVersion: 2
guid: e5c863eaf57c6d246a1faa0ec2cc986c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

25
Assets/Scripts/Tools/CacheUtilities.cs


using UnityEngine;
using UnityEditor;
// Based on this script by kimsama: https://gist.github.com/kimsama/5530104
public class CacheTools : ScriptableObject
{
[MenuItem("Tools/Cache/Clean Cache")]
public static void CleanCache()
{
if (Caching.ClearCache())
{
Debug.LogWarning("Successfully cleaned all caches.");
}
else
{
Debug.LogWarning("Cache was in use.");
}
}
[MenuItem("Tools/Cache/Clean Store")]
public static void CleanStore()
{
// TODO: Clean up the current selected store
}
}

11
Assets/Scripts/Tools/CacheUtilities.cs.meta


fileFormatVersion: 2
guid: 8db8ccfeff2cb314582b2d6c6be088d0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存