Add Custom Enviroment Option (Need to fix Lighting issue))
This commit is contained in:
parent
6992599d72
commit
d8e8fa4ddb
8
Assets/AssetBundles.meta
Normal file
8
Assets/AssetBundles.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4bb97dac5c7447459a9b7e0b2725143
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetBundles/AssetBundles
Normal file
BIN
Assets/AssetBundles/AssetBundles
Normal file
Binary file not shown.
7
Assets/AssetBundles/AssetBundles.manifest
Normal file
7
Assets/AssetBundles/AssetBundles.manifest
Normal file
@ -0,0 +1,7 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 4136947632
|
||||
AssetBundleManifest:
|
||||
AssetBundleInfos:
|
||||
Info_0:
|
||||
Name: defaultroom
|
||||
Dependencies: {}
|
7
Assets/AssetBundles/AssetBundles.manifest.meta
Normal file
7
Assets/AssetBundles/AssetBundles.manifest.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 028f1f75f8d04d54f9ae00e17ba80143
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
7
Assets/AssetBundles/AssetBundles.meta
Normal file
7
Assets/AssetBundles/AssetBundles.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01152e74e83299847bf6081548cc83b6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetBundles/defaultroom
Normal file
BIN
Assets/AssetBundles/defaultroom
Normal file
Binary file not shown.
57
Assets/AssetBundles/defaultroom.manifest
Normal file
57
Assets/AssetBundles/defaultroom.manifest
Normal file
@ -0,0 +1,57 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 1307084116
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 636dd6476d15f862bf5bdf3377f13ad7
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: f21949c02115747e8ce077b6c850c7ab
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
Script: {instanceID: 0}
|
||||
- Class: 4
|
||||
Script: {instanceID: 0}
|
||||
- Class: 21
|
||||
Script: {instanceID: 0}
|
||||
- Class: 23
|
||||
Script: {instanceID: 0}
|
||||
- Class: 28
|
||||
Script: {instanceID: 0}
|
||||
- Class: 33
|
||||
Script: {instanceID: 0}
|
||||
- Class: 43
|
||||
Script: {instanceID: 0}
|
||||
- Class: 48
|
||||
Script: {instanceID: 0}
|
||||
- Class: 65
|
||||
Script: {instanceID: 0}
|
||||
- Class: 108
|
||||
Script: {instanceID: 0}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
- Class: 115
|
||||
Script: {instanceID: 0}
|
||||
- Class: 213
|
||||
Script: {instanceID: 0}
|
||||
- Class: 222
|
||||
Script: {instanceID: 0}
|
||||
- Class: 223
|
||||
Script: {instanceID: 0}
|
||||
- Class: 224
|
||||
Script: {instanceID: 0}
|
||||
SerializeReferenceClassIdentifiers:
|
||||
- AssemblyName: UnityEngine.CoreModule
|
||||
ClassName: UnityEngine.Events.PersistentCallGroup
|
||||
- AssemblyName: UnityEngine.UI
|
||||
ClassName: UnityEngine.UI.MaskableGraphic/CullStateChangedEvent
|
||||
Assets:
|
||||
- Assets/Prefab/DefaultRoom.prefab
|
||||
Dependencies: []
|
7
Assets/AssetBundles/defaultroom.manifest.meta
Normal file
7
Assets/AssetBundles/defaultroom.manifest.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ff9e8e1d0854af4d8de2a52f43b548c
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
7
Assets/AssetBundles/defaultroom.meta
Normal file
7
Assets/AssetBundles/defaultroom.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 768cf910a10c80d448e6b59e04216ee2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -35,7 +35,6 @@ MonoBehaviour:
|
||||
features:
|
||||
- {fileID: 7581227243671795047}
|
||||
- {fileID: -3687958811547312280}
|
||||
- {fileID: 3105951399032240424}
|
||||
- {fileID: -660904743828199304}
|
||||
- {fileID: 587458779450762736}
|
||||
- {fileID: 2332717924642193878}
|
||||
@ -43,6 +42,7 @@ MonoBehaviour:
|
||||
- {fileID: 6760998554925213443}
|
||||
- {fileID: 3607529374417723074}
|
||||
- {fileID: 2518257850819104886}
|
||||
- {fileID: 3105951399032240424}
|
||||
- {fileID: -9221150314526244616}
|
||||
m_renderMode: 1
|
||||
m_depthSubmissionMode: 0
|
||||
|
1139
Assets/Prefab/DefaultRoom.prefab
Normal file
1139
Assets/Prefab/DefaultRoom.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefab/DefaultRoom.prefab.meta
Normal file
7
Assets/Prefab/DefaultRoom.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92f418b5d93ad334e938ddaf6cf07fa8
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName: defaultroom
|
||||
assetBundleVariant:
|
@ -684,7 +684,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 14
|
||||
m_RootOrder: 19
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &89868841
|
||||
BoxCollider:
|
||||
@ -3775,7 +3775,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 17
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &487003802
|
||||
BoxCollider:
|
||||
@ -4821,12 +4821,13 @@ RectTransform:
|
||||
- {fileID: 1448701705}
|
||||
- {fileID: 1354701492}
|
||||
- {fileID: 1247551590}
|
||||
- {fileID: 1705862254}
|
||||
m_Father: {fileID: 320530496}
|
||||
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: 375, y: -40}
|
||||
m_AnchoredPosition: {x: 280, y: -40}
|
||||
m_SizeDelta: {x: 400, y: 275}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &585616700
|
||||
@ -5051,7 +5052,7 @@ PrefabInstance:
|
||||
- target: {fileID: 823674106448341281, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1012883976206016704, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
@ -6485,7 +6486,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 13
|
||||
m_RootOrder: 16
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &732294716
|
||||
BoxCollider:
|
||||
@ -7615,7 +7616,7 @@ GameObject:
|
||||
- component: {fileID: 879895220}
|
||||
- component: {fileID: 879895219}
|
||||
m_Layer: 0
|
||||
m_Name: uWindowCapture
|
||||
m_Name: uWindowCaptureManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -7648,7 +7649,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 9
|
||||
m_RootOrder: 18
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &880146307
|
||||
BoxCollider:
|
||||
@ -7749,7 +7750,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 10
|
||||
m_RootOrder: 13
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &910165458
|
||||
MonoBehaviour:
|
||||
@ -8501,7 +8502,7 @@ PrefabInstance:
|
||||
- target: {fileID: 4740189457704012167, guid: 0ff442244da79eb4b80cbf1df4230a0f,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5248623083823133808, guid: 0ff442244da79eb4b80cbf1df4230a0f,
|
||||
type: 3}
|
||||
@ -8572,6 +8573,50 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
LightManager: {fileID: 1251312951}
|
||||
--- !u!1 &938673864
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 938673866}
|
||||
- component: {fileID: 938673865}
|
||||
m_Layer: 0
|
||||
m_Name: AssetBundleManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &938673865
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938673864}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 43e8e49893eca1e4690cb1e220f45035, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &938673866
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938673864}
|
||||
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: 0}
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &946114101
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -9454,6 +9499,37 @@ ReflectionProbe:
|
||||
m_UseOcclusionCulling: 1
|
||||
m_Importance: 0
|
||||
m_CustomBakedTexture: {fileID: 0}
|
||||
--- !u!1 &1016856927
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1016856928}
|
||||
m_Layer: 0
|
||||
m_Name: ----------Managers----------
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1016856928
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1016856927}
|
||||
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: 0}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1018863578
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -10117,12 +10193,12 @@ PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_TransformParent: {fileID: 1830373568}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 8
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
@ -10147,7 +10223,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
@ -10157,7 +10233,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
@ -11439,7 +11515,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 11
|
||||
m_RootOrder: 14
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1216452012
|
||||
MonoBehaviour:
|
||||
@ -12543,7 +12619,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 12
|
||||
m_RootOrder: 15
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1257458054 stripped
|
||||
GameObject:
|
||||
@ -13167,7 +13243,7 @@ PrefabInstance:
|
||||
- target: {fileID: 4740189457704012167, guid: 0ff442244da79eb4b80cbf1df4230a0f,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5248623083823133808, guid: 0ff442244da79eb4b80cbf1df4230a0f,
|
||||
type: 3}
|
||||
@ -13752,7 +13828,7 @@ PrefabInstance:
|
||||
- target: {fileID: 823674106448341281, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 200
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1012883976206016704, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
@ -14563,7 +14639,7 @@ PrefabInstance:
|
||||
- target: {fileID: 823674106448341281, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1012883976206016704, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
@ -17208,6 +17284,257 @@ GameObject:
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1774209490}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1705862253
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 585616699}
|
||||
m_Modifications:
|
||||
- target: {fileID: 611496109312701933, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_text
|
||||
value: Skybox (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 823674106448341281, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1012883976206016704, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1253512180684728437, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Enviroment
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1253512180684728437, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1910438252594473881, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2152940796011086207, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_text
|
||||
value: None
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2250131989589984653, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3267840621997083883, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3687683374621869137, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_Value
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3687683374621869137, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_Options.m_Options.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3687683374621869137, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_Options.m_Options.Array.data[0].m_Text
|
||||
value: None
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3961746984784792006, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 30
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.000034059798
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5107446686814099985, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6288213690811232823, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6325736157334935911, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6508363899705678762, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6608622035275882204, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7629530146184496291, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8114526563191014607, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8386231115474838007, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9141112504391667964, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: dd46221f8de0268428f1a148427fec0d, type: 3}
|
||||
--- !u!224 &1705862254 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 4631776027059794196, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1705862253}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1705862255 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 3267840621997083883, guid: dd46221f8de0268428f1a148427fec0d,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1705862253}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1705862262
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1705862255}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f8c67c63085e2bf48ba095e6a2b471bf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
useEnvironment: 1
|
||||
EnvironmentParent: {fileID: 1830373568}
|
||||
CurrentEnvironment: {fileID: 0}
|
||||
--- !u!1 &1710386186 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -2016359843640700029, guid: cf8684b3c4f47b94aa7cb23ce498caf3,
|
||||
@ -41524,6 +41851,38 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.0004, y: 0.00065, z: 0.003}
|
||||
m_Center: {x: 0, y: 0, z: -0.001475}
|
||||
--- !u!1 &1830373567
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1830373568}
|
||||
m_Layer: 0
|
||||
m_Name: Enviroment Parent
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1830373568
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1830373567}
|
||||
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:
|
||||
- {fileID: 2104767417}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &1835515280
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -43431,7 +43790,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 15
|
||||
m_RootOrder: 17
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1972244961
|
||||
MonoBehaviour:
|
||||
@ -44075,7 +44434,7 @@ Transform:
|
||||
- {fileID: 986642662}
|
||||
- {fileID: 1414750230}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 16
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1981983055 stripped
|
||||
GameObject:
|
||||
@ -44774,7 +45133,7 @@ PrefabInstance:
|
||||
- target: {fileID: 4740189457704012167, guid: 0ff442244da79eb4b80cbf1df4230a0f,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
value: 225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5248623083823133808, guid: 0ff442244da79eb4b80cbf1df4230a0f,
|
||||
type: 3}
|
||||
@ -46346,6 +46705,12 @@ GameObject:
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1111700630}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &2104767417 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 31f0c3f4ace06884a8eb57730c1e9c57,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1111700630}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &2105953007
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
Binary file not shown.
@ -1,123 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9542bd32d53e914cb7503485cf48081
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 1
|
||||
seamlessCubemap: 1
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: 0
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 2
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -20,6 +20,7 @@ public class Config
|
||||
public float HandZ = 0;
|
||||
public float PlayerHeight = 0;
|
||||
public int Skybox = 0;
|
||||
public int Enviroment = 0;
|
||||
public float HapticDuration = 0.1f;
|
||||
public float HapticAmplitude = 0.75f;
|
||||
public int TouchSampleRate = 3;
|
||||
|
@ -23,7 +23,7 @@ public class ConfigManager : MonoBehaviour
|
||||
void Awake()
|
||||
{
|
||||
onConfigChanged += EnsureInitialization;
|
||||
onConfigChanged += SaveFile;
|
||||
onConfigChanged += SaveFileWait;
|
||||
|
||||
}
|
||||
void Start()
|
||||
@ -53,7 +53,7 @@ public class ConfigManager : MonoBehaviour
|
||||
{
|
||||
Debug.Log("Config file does not exist");
|
||||
config = new Config();
|
||||
SaveFile();
|
||||
SaveFileWait();
|
||||
Debug.Log("Config file created");
|
||||
}
|
||||
}
|
||||
@ -61,13 +61,13 @@ public class ConfigManager : MonoBehaviour
|
||||
{
|
||||
return Application.dataPath + "/../config.json";
|
||||
}
|
||||
public static void SaveFile()
|
||||
public static void SaveFileWait()
|
||||
{
|
||||
isSavingConfig = true;
|
||||
saverTimer = 0;
|
||||
//Debug.Log("Saving config file");
|
||||
}
|
||||
public void saveFileWait()
|
||||
public void saveFile()
|
||||
{
|
||||
File.WriteAllText(GetFileName(), JsonConvert.SerializeObject(config, Formatting.Indented));
|
||||
Debug.Log("Config file saved");
|
||||
@ -82,11 +82,16 @@ public class ConfigManager : MonoBehaviour
|
||||
{
|
||||
isSavingConfig = false;
|
||||
saverTimer = 0;
|
||||
saveFileWait();
|
||||
saveFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
saveFile();
|
||||
}
|
||||
|
||||
public static GameObject GetConfigPanelWidget(string configKeyName)
|
||||
{
|
||||
EnsureInitialization();
|
||||
@ -123,10 +128,12 @@ public class ConfigManager : MonoBehaviour
|
||||
foreach (var configPanelComponent in _configPanelComponents)
|
||||
{
|
||||
var widget = configPanelComponent.Widget;
|
||||
if (widget.GetComponent<TMP_Dropdown>() != null)
|
||||
var dropdown = widget.GetComponent<TMP_Dropdown>();
|
||||
var toggle = widget.GetComponent<Toggle>();
|
||||
var slider = widget.GetComponent<Slider>();
|
||||
var valueManager = widget.GetComponent<ValueManager>();
|
||||
if (dropdown != null) // add listener to dropdown to update config by key name
|
||||
{
|
||||
var dropdown = widget.GetComponent<TMP_Dropdown>();
|
||||
// add listener to dropdown to update config by key name
|
||||
dropdown.onValueChanged.AddListener((int value) =>
|
||||
{
|
||||
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
|
||||
@ -134,9 +141,8 @@ public class ConfigManager : MonoBehaviour
|
||||
onConfigChanged?.Invoke();
|
||||
});
|
||||
}
|
||||
else if (widget.GetComponent<Toggle>() != null)
|
||||
else if (toggle != null)
|
||||
{
|
||||
var toggle = widget.GetComponent<Toggle>();
|
||||
toggle.onValueChanged.AddListener((bool value) =>
|
||||
{
|
||||
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
|
||||
@ -144,9 +150,8 @@ public class ConfigManager : MonoBehaviour
|
||||
onConfigChanged?.Invoke();
|
||||
});
|
||||
}
|
||||
else if (widget.GetComponent<Slider>() != null)
|
||||
else if (slider != null)
|
||||
{
|
||||
var slider = widget.GetComponent<Slider>();
|
||||
slider.onValueChanged.AddListener((float value) =>
|
||||
{
|
||||
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
|
||||
@ -154,9 +159,8 @@ public class ConfigManager : MonoBehaviour
|
||||
onConfigChanged?.Invoke();
|
||||
});
|
||||
}
|
||||
else if (widget.GetComponent<ValueManager>() != null)
|
||||
else if (valueManager != null)
|
||||
{
|
||||
var valueManager = widget.GetComponent<ValueManager>();
|
||||
valueManager.onValueChanged.AddListener(delegate
|
||||
{
|
||||
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
|
||||
|
67
Assets/Script/Configuration/EnviromentManager.cs
Normal file
67
Assets/Script/Configuration/EnviromentManager.cs
Normal file
@ -0,0 +1,67 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using System.IO;
|
||||
|
||||
[RequireComponent(typeof(TMP_Dropdown))]
|
||||
public class EnviromentManager : MonoBehaviour
|
||||
{
|
||||
private TMP_Dropdown Dropdown;
|
||||
public bool useEnvironment = true;
|
||||
public Transform EnvironmentParent;
|
||||
public GameObject CurrentEnvironment;
|
||||
|
||||
private string currentEnvironmentName;
|
||||
private List<FileInfo> enviromentFiles = new List<FileInfo>();
|
||||
void Start()
|
||||
{
|
||||
Dropdown = GetComponent<TMP_Dropdown>();
|
||||
AddEnviorments();
|
||||
Dropdown.onValueChanged.AddListener((int value) => {
|
||||
currentEnvironmentName = Dropdown.options[value].text;
|
||||
if (value == 0)
|
||||
useEnvironment = false;
|
||||
else
|
||||
{
|
||||
useEnvironment = true;
|
||||
SetEnvironment();
|
||||
}
|
||||
Debug.Log("Value: " + value);
|
||||
});
|
||||
Dropdown.onValueChanged?.Invoke(Dropdown.value);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (useEnvironment)
|
||||
{
|
||||
CurrentEnvironment.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentEnvironment.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
void AddEnviorments()
|
||||
{
|
||||
Dropdown.options.Clear();
|
||||
Dropdown.options.Add(new TMP_Dropdown.OptionData("None"));
|
||||
|
||||
enviromentFiles = AssetBundleManager.Instance.GetAssetBundleFiles("Enviroments");
|
||||
foreach (var file in enviromentFiles)
|
||||
{
|
||||
Dropdown.options.Add(new TMP_Dropdown.OptionData(file.Name));
|
||||
}
|
||||
}
|
||||
void SetEnvironment()
|
||||
{
|
||||
if (CurrentEnvironment != null)
|
||||
{
|
||||
Destroy(CurrentEnvironment);
|
||||
}
|
||||
GameObject env = AssetBundleManager.Instance.LoadAsset<GameObject>("Enviroments", currentEnvironmentName);
|
||||
CurrentEnvironment = Instantiate(env, EnvironmentParent);
|
||||
}
|
||||
}
|
11
Assets/Script/Configuration/EnviromentManager.cs.meta
Normal file
11
Assets/Script/Configuration/EnviromentManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8c67c63085e2bf48ba095e6a2b471bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -23,27 +23,29 @@ public class SkyboxSwitcher : MonoBehaviour
|
||||
private TMP_Dropdown Dropdown;
|
||||
|
||||
void Start()
|
||||
{
|
||||
{
|
||||
Dropdown = GetComponent<TMP_Dropdown>(); // get the dropdown component
|
||||
|
||||
skyboxes.Insert(0, RenderSettings.skybox); // add ubiquitous default skybox (should be current)
|
||||
|
||||
// check StreamingAssets folder for additional skybox textures
|
||||
skyboxPath = Path.Combine(Application.streamingAssetsPath, "SkyboxTextures");
|
||||
StartCoroutine(AddSkyboxes());
|
||||
|
||||
Dropdown = GetComponent<TMP_Dropdown>();
|
||||
Dropdown.onValueChanged.AddListener((int value) => {
|
||||
if (value == 0)
|
||||
Dropdown.value = ConfigManager.config.Skybox; // set the dropdown to the current skybox index
|
||||
Dropdown.onValueChanged.AddListener((int value) => { // add listener to dropdown
|
||||
if (value == 0) // if the first option is selected, disable the room
|
||||
{
|
||||
Room.SetActive(true);
|
||||
}
|
||||
else
|
||||
else // otherwise, enable the room and set the skybox
|
||||
{
|
||||
Room.SetActive(false);
|
||||
currentSkyboxIndex = Dropdown.value;
|
||||
SetSkybox();
|
||||
}
|
||||
});
|
||||
Dropdown.onValueChanged?.Invoke(Dropdown.value);
|
||||
Dropdown.onValueChanged?.Invoke(Dropdown.value); // invoke the listener to set the skybox on startup
|
||||
}
|
||||
|
||||
IEnumerator AddSkyboxes()
|
||||
@ -76,7 +78,7 @@ public class SkyboxSwitcher : MonoBehaviour
|
||||
skyboxMat.SetTexture("_MainTex", texture);
|
||||
skyboxes.Add(skyboxMat);
|
||||
|
||||
Dropdown.options.Add(new TMP_Dropdown.OptionData(file.Name));
|
||||
Dropdown.options.Add(new TMP_Dropdown.OptionData(file.Name)); // add the skybox option to the dropdown
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,6 @@ public class SpectatorManager : MonoBehaviour
|
||||
ConfigManager.config.TPCamRotation[0] = SpectatorTPTarget.rotation.eulerAngles.x;
|
||||
ConfigManager.config.TPCamRotation[1] = SpectatorTPTarget.rotation.eulerAngles.y;
|
||||
ConfigManager.config.TPCamRotation[2] = SpectatorTPTarget.rotation.eulerAngles.z;
|
||||
ConfigManager.SaveFile();
|
||||
ConfigManager.SaveFileWait();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@ -7,11 +5,21 @@ using Lavender.Systems;
|
||||
|
||||
public class StartBatchManager : MonoBehaviour
|
||||
{
|
||||
uint pid = 0;
|
||||
private void Start()
|
||||
{
|
||||
ConfigManager.EnsureInitialization();
|
||||
if (ConfigManager.config.batFileLocation != "")
|
||||
StartExternalProcess.Start(ConfigManager.config.batFileLocation);
|
||||
pid = StartExternalProcess.Start(ConfigManager.config.batFileLocation);
|
||||
UnityEngine.Debug.Log("Batch file with PID: " + pid);
|
||||
//Process.Start(Path.GetFullPath(ConfigManager.config.batFileLocation));
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (pid != 0)
|
||||
{
|
||||
StartExternalProcess.KillProcess(pid);
|
||||
UnityEngine.Debug.Log("Batch file with PID: " + pid + " killed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
8
Assets/Script/Editor.meta
Normal file
8
Assets/Script/Editor.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8c97dfc474535649bde7c87d8af6f85
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
21
Assets/Script/Editor/AssetBundleCreator.cs
Normal file
21
Assets/Script/Editor/AssetBundleCreator.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
public class AssetBundleCreator
|
||||
{
|
||||
static string assetBundleDirectory = "Assets/AssetBundles";
|
||||
[MenuItem("Assets/Build AssetBundles")]
|
||||
static void BuildAllAssetBundles()
|
||||
{
|
||||
if (!Directory.Exists(assetBundleDirectory))
|
||||
Directory.CreateDirectory(assetBundleDirectory);
|
||||
try
|
||||
{
|
||||
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
UnityEngine.Debug.Log(e);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Script/Editor/AssetBundleCreator.cs.meta
Normal file
11
Assets/Script/Editor/AssetBundleCreator.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a014b060909afe64db3544c413b8b653
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
73
Assets/Script/Essential/AssetBundleManager.cs
Normal file
73
Assets/Script/Essential/AssetBundleManager.cs
Normal file
@ -0,0 +1,73 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
|
||||
public class AssetBundleManager : MonoBehaviour
|
||||
{
|
||||
public static AssetBundleManager Instance { get; private set; }
|
||||
|
||||
private Dictionary<string, AssetBundle> assetBundles = new Dictionary<string, AssetBundle>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
public T LoadAsset<T>(string assetBundleFolder, string assetBundleName) where T : Object
|
||||
{
|
||||
UnloadAllAssetBundles();
|
||||
LoadAssetBundle(assetBundleFolder, assetBundleName);
|
||||
if (assetBundles.ContainsKey(assetBundleName))
|
||||
{
|
||||
string rootAssetPath = assetBundles[assetBundleName].GetAllAssetNames()[0];
|
||||
return assetBundles[assetBundleName].LoadAsset<T>(rootAssetPath);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void LoadAssetBundle(string assetBundleFolder, string assetBundleName)
|
||||
{
|
||||
if (!assetBundles.ContainsKey(assetBundleName))
|
||||
{
|
||||
AssetBundle assetBundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, assetBundleFolder, assetBundleName));
|
||||
assetBundles.Add(assetBundleName, assetBundle);
|
||||
}
|
||||
}
|
||||
|
||||
public void UnloadAssetBundle(string assetBundleName)
|
||||
{
|
||||
if (assetBundles.ContainsKey(assetBundleName))
|
||||
{
|
||||
assetBundles[assetBundleName].Unload(true);
|
||||
assetBundles.Remove(assetBundleName);
|
||||
}
|
||||
}
|
||||
|
||||
public void UnloadAllAssetBundles()
|
||||
{
|
||||
foreach (var assetBundle in assetBundles)
|
||||
{
|
||||
assetBundle.Value.Unload(true);
|
||||
}
|
||||
assetBundles.Clear();
|
||||
}
|
||||
|
||||
public List<FileInfo> GetAssetBundleFiles(string assetBundleFolder)
|
||||
{
|
||||
|
||||
var path = Path.Combine(Application.streamingAssetsPath, assetBundleFolder);
|
||||
if (!Directory.Exists(path))
|
||||
Directory.CreateDirectory(path);
|
||||
var dir = new DirectoryInfo(path);
|
||||
var files = new List<FileInfo>(dir.GetFiles("*.abf"));
|
||||
return files;
|
||||
}
|
||||
|
||||
}
|
11
Assets/Script/Essential/AssetBundleManager.cs.meta
Normal file
11
Assets/Script/Essential/AssetBundleManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43e8e49893eca1e4690cb1e220f45035
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/StreamingAssets/Enviroments.meta
Normal file
8
Assets/StreamingAssets/Enviroments.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90e00d44a0563f948a22c5bd3faf9845
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/StreamingAssets/Enviroments/defaultroom.abf
Normal file
BIN
Assets/StreamingAssets/Enviroments/defaultroom.abf
Normal file
Binary file not shown.
7
Assets/StreamingAssets/Enviroments/defaultroom.abf.meta
Normal file
7
Assets/StreamingAssets/Enviroments/defaultroom.abf.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a06315d58fc3874ea238d3ac208573d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -49,15 +49,15 @@ GraphicsSettings:
|
||||
m_DefaultRenderingPath: 1
|
||||
m_DefaultMobileRenderingPath: 1
|
||||
m_TierSettings: []
|
||||
m_LightmapStripping: 0
|
||||
m_LightmapStripping: 1
|
||||
m_FogStripping: 0
|
||||
m_InstancingStripping: 0
|
||||
m_LightmapKeepPlain: 1
|
||||
m_LightmapKeepDirCombined: 1
|
||||
m_LightmapKeepDynamicPlain: 1
|
||||
m_LightmapKeepDynamicDirCombined: 1
|
||||
m_LightmapKeepShadowMask: 1
|
||||
m_LightmapKeepSubtractive: 1
|
||||
m_LightmapKeepDynamicPlain: 0
|
||||
m_LightmapKeepDynamicDirCombined: 0
|
||||
m_LightmapKeepShadowMask: 0
|
||||
m_LightmapKeepSubtractive: 0
|
||||
m_FogKeepLinear: 1
|
||||
m_FogKeepExp: 1
|
||||
m_FogKeepExp2: 1
|
||||
|
Loading…
Reference in New Issue
Block a user