From ba6bf87eac6feeb92f53499eb6543507a5a3570c Mon Sep 17 00:00:00 2001 From: Jeff Campbell Date: Wed, 17 Apr 2019 08:43:08 +0200 Subject: [PATCH 1/5] Modified base Variable and Reference Drawer * Modified DrawValue method of BaseVariableDrawer to be virtual. * Modified BaseReferenceDrawer to check if constant property height is greater than a single line, and if it is to display it inline below the field rather than to the right of the label. For existing value type reference types this will not change their UX, but for more complex types it allows for more space to be displayed across the entire width of the inspector. Popup will display as normal. --- .../Editor/Drawers/BaseReferenceDrawer.cs | 71 +++++++++++++------ .../Editor/Inspectors/BaseVariableEditor.cs | 2 +- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs b/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs index 9b19b127..8e48adb3 100644 --- a/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs +++ b/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs @@ -13,21 +13,34 @@ public class BaseReferenceDrawer : PropertyDrawer { "Use Constant", "Use Variable" - }; + }; - /// Cached style to use to draw the popup button. - private GUIStyle popupStyle; - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + /// + /// Cached style to use to draw the popup button. Lazy loaded as GUIStyles cannot be initialized as + /// an inline static field. + /// + private static GUIStyle PopupStyle { - if (popupStyle == null) + get { - popupStyle = new GUIStyle(GUI.skin.GetStyle("PaneOptions")); - popupStyle.imagePosition = ImagePosition.ImageOnly; + if (_popupStyle == null) + { + _popupStyle = new GUIStyle(GUI.skin.GetStyle("PaneOptions")) + { + imagePosition = ImagePosition.ImageOnly + }; + } + + return _popupStyle; } + } + + private static GUIStyle _popupStyle; + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { label = EditorGUI.BeginProperty(position, label, property); - position = EditorGUI.PrefixLabel(position, label); + var refValuePosition = EditorGUI.PrefixLabel(position, label); EditorGUI.BeginChangeCheck(); @@ -37,28 +50,44 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten SerializedProperty variable = property.FindPropertyRelative("_variable"); // Calculate rect for configuration button - Rect buttonRect = new Rect(position); - buttonRect.yMin += popupStyle.margin.top; - buttonRect.width = popupStyle.fixedWidth + popupStyle.margin.right; - position.xMin = buttonRect.xMax; + Rect buttonRect = new Rect(refValuePosition); + buttonRect.yMin += PopupStyle.margin.top; + buttonRect.yMax = buttonRect.yMin + EditorGUIUtility.singleLineHeight; + buttonRect.width = PopupStyle.fixedWidth + PopupStyle.margin.right; + refValuePosition.xMin = buttonRect.xMax; - // Store old indent level and set it to 0, the PrefixLabel takes care of it - int indent = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - - int result = EditorGUI.Popup(buttonRect, useConstant.boolValue ? 0 : 1, popupOptions, popupStyle); + int result = EditorGUI.Popup(buttonRect, useConstant.boolValue ? 0 : 1, popupOptions, PopupStyle); useConstant.boolValue = result == 0; - EditorGUI.PropertyField(position, + if (useConstant.boolValue && EditorGUI.GetPropertyHeight(constantValue) > EditorGUIUtility.singleLineHeight) + { + refValuePosition = EditorGUI.IndentedRect(new Rect + { + position = new Vector2(position.x, position.y + EditorGUIUtility.singleLineHeight), + size = new Vector2(position.width, EditorGUI.GetPropertyHeight(constantValue) + + EditorGUIUtility.singleLineHeight) + }); + GUI.Box(refValuePosition, string.Empty); + } + + EditorGUI.PropertyField(refValuePosition, useConstant.boolValue ? constantValue : variable, GUIContent.none); if (EditorGUI.EndChangeCheck()) property.serializedObject.ApplyModifiedProperties(); - EditorGUI.indentLevel = indent; EditorGUI.EndProperty(); } - } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + SerializedProperty useConstant = property.FindPropertyRelative("_useConstant"); + return !useConstant.boolValue + ? EditorGUIUtility.singleLineHeight + : EditorGUIUtility.singleLineHeight * 2f + + EditorGUI.GetPropertyHeight(property.FindPropertyRelative("_constantValue")); + } + } } \ No newline at end of file diff --git a/Assets/SO Architecture/Editor/Inspectors/BaseVariableEditor.cs b/Assets/SO Architecture/Editor/Inspectors/BaseVariableEditor.cs index 36cab341..705ff62b 100644 --- a/Assets/SO Architecture/Editor/Inspectors/BaseVariableEditor.cs +++ b/Assets/SO Architecture/Editor/Inspectors/BaseVariableEditor.cs @@ -45,7 +45,7 @@ public override void OnInspectorGUI() DrawReadonlyField(); DrawDeveloperDescription(); } - protected void DrawValue() + protected virtual void DrawValue() { using (var scope = new EditorGUI.ChangeCheckScope()) { From d44310a684176c7ac7f2b2b1ef0b1d1a720addb5 Mon Sep 17 00:00:00 2001 From: Jeff Campbell Date: Wed, 17 Apr 2019 08:54:38 +0200 Subject: [PATCH 2/5] Created Scene Variable, Collection, and Reference * Created SceneVariable as a generic BaseVariable of type SceneInfo, where SceneInfo contains serializable information about a scene asset. * Created SceneVariableEditor to allow for custom inspection of SceneVariable as well as SceneInfoPropertyDrawer for the serializable value type. This allows for a user to assign a SceneAsset to an object field and ping it while only the serialized relevant values (full path, index and enabled status in build settings) are persisted in the ScriptableObject. Helpful warnings are shown for the user if a scene is not assigned, present in the build settings, or enabled in the build settings. * Created SceneCollection * Created AssemblyInfo.cs as a code file for assembly attributes for the ScriptableObject-Architecture Assembly Definition. The current assembly attribute allows for the internals of this assembly to be visible to ScriptableObject-Architecture.Editor. This allows for internal types and members to be used in inspectors, editor windows without directly exposing them to end-users. --- Assets/SO Architecture/AssemblyInfo.cs | 4 + Assets/SO Architecture/AssemblyInfo.cs.meta | 11 ++ .../Collections/SceneCollection.cs | 13 ++ .../Collections/SceneCollection.cs.meta | 11 ++ .../Editor/Drawers/SceneInfoPropertyDrawer.cs | 75 +++++++++++ .../Drawers/SceneInfoPropertyDrawer.cs.meta | 3 + .../Editor/Inspectors/SceneVariableEditor.cs | 59 +++++++++ .../Inspectors/SceneVariableEditor.cs.meta | 3 + .../References/SceneReference.cs | 13 ++ .../References/SceneReference.cs.meta | 11 ++ .../Variables/SceneVariable.cs | 122 ++++++++++++++++++ .../Variables/SceneVariable.cs.meta | 11 ++ 12 files changed, 336 insertions(+) create mode 100644 Assets/SO Architecture/AssemblyInfo.cs create mode 100644 Assets/SO Architecture/AssemblyInfo.cs.meta create mode 100644 Assets/SO Architecture/Collections/SceneCollection.cs create mode 100644 Assets/SO Architecture/Collections/SceneCollection.cs.meta create mode 100644 Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs create mode 100644 Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs.meta create mode 100644 Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs create mode 100644 Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs.meta create mode 100644 Assets/SO Architecture/References/SceneReference.cs create mode 100644 Assets/SO Architecture/References/SceneReference.cs.meta create mode 100644 Assets/SO Architecture/Variables/SceneVariable.cs create mode 100644 Assets/SO Architecture/Variables/SceneVariable.cs.meta diff --git a/Assets/SO Architecture/AssemblyInfo.cs b/Assets/SO Architecture/AssemblyInfo.cs new file mode 100644 index 00000000..5d50669c --- /dev/null +++ b/Assets/SO Architecture/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; + +// Expose internal members to editor assembly for inspectors, other editor windows or functions +[assembly: InternalsVisibleTo("ScriptableObject-Architecture.Editor")] diff --git a/Assets/SO Architecture/AssemblyInfo.cs.meta b/Assets/SO Architecture/AssemblyInfo.cs.meta new file mode 100644 index 00000000..17833ab8 --- /dev/null +++ b/Assets/SO Architecture/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e00e4c8cc9a36d34e974afdacc9e034f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SO Architecture/Collections/SceneCollection.cs b/Assets/SO Architecture/Collections/SceneCollection.cs new file mode 100644 index 00000000..c421b4f9 --- /dev/null +++ b/Assets/SO Architecture/Collections/SceneCollection.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +namespace ScriptableObjectArchitecture +{ + [CreateAssetMenu( + fileName = "SceneCollection.asset", + menuName = SOArchitecture_Utility.COLLECTION_SUBMENU + "Scene", + order = 120)] + public class SceneCollection : Collection + { + + } +} \ No newline at end of file diff --git a/Assets/SO Architecture/Collections/SceneCollection.cs.meta b/Assets/SO Architecture/Collections/SceneCollection.cs.meta new file mode 100644 index 00000000..f0f80303 --- /dev/null +++ b/Assets/SO Architecture/Collections/SceneCollection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: baec154247b223d4a9b1afe90aa2cf2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs b/Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs new file mode 100644 index 00000000..57d2ed5f --- /dev/null +++ b/Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs @@ -0,0 +1,75 @@ +using UnityEditor; +using UnityEngine; + +namespace ScriptableObjectArchitecture.Editor +{ + [CustomPropertyDrawer(typeof(SceneInfo))] + internal sealed class SceneInfoPropertyDrawer : PropertyDrawer + { + private const string SCENE_PREVIEW_TITLE = "Preview (Read-Only)"; + private const string SCENE_NAME_PROPERTY = "_sceneName"; + private const string SCENE_INDEX_PROPERTY = "_sceneIndex"; + private const string SCENE_ENABLED_PROPERTY = "_isSceneEnabled"; + + public override void OnGUI(Rect propertyRect, SerializedProperty property, GUIContent label) + { + var sceneNameProperty = property.FindPropertyRelative(SCENE_NAME_PROPERTY); + var sceneIndexProperty = property.FindPropertyRelative(SCENE_INDEX_PROPERTY); + var enabledProperty = property.FindPropertyRelative(SCENE_ENABLED_PROPERTY); + + EditorGUI.BeginProperty(propertyRect, new GUIContent(property.displayName), property); + EditorGUI.BeginChangeCheck(); + + // Draw Object Selector for SceneAssets + var sceneAssetRect = new Rect + { + position = propertyRect.position, + size = new Vector2(propertyRect.width, EditorGUIUtility.singleLineHeight) + }; + + var oldSceneAsset = AssetDatabase.LoadAssetAtPath(sceneNameProperty.stringValue); + var sceneAsset = EditorGUI.ObjectField(sceneAssetRect, oldSceneAsset, typeof(SceneAsset), false); + var sceneAssetPath = AssetDatabase.GetAssetPath(sceneAsset); + if (sceneNameProperty.stringValue != sceneAssetPath) + { + sceneNameProperty.stringValue = sceneAssetPath; + } + + if (string.IsNullOrEmpty(sceneNameProperty.stringValue)) + { + sceneIndexProperty.intValue = -1; + enabledProperty.boolValue = false; + } + + // Draw preview fields for scene information. + var titleLabelRect = sceneAssetRect; + titleLabelRect.y += EditorGUIUtility.singleLineHeight; + + EditorGUI.LabelField(titleLabelRect, SCENE_PREVIEW_TITLE); + EditorGUI.BeginDisabledGroup(true); + var nameRect = titleLabelRect; + nameRect.y += EditorGUIUtility.singleLineHeight; + + var indexRect = nameRect; + indexRect.y += EditorGUIUtility.singleLineHeight; + + var enabledRect = indexRect; + enabledRect.y += EditorGUIUtility.singleLineHeight; + + EditorGUI.PropertyField(nameRect, sceneNameProperty); + EditorGUI.PropertyField(indexRect, sceneIndexProperty); + EditorGUI.PropertyField(enabledRect, enabledProperty); + EditorGUI.EndDisabledGroup(); + if (EditorGUI.EndChangeCheck()) + { + property.serializedObject.ApplyModifiedProperties(); + } + EditorGUI.EndProperty(); + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return EditorGUIUtility.singleLineHeight * 4; + } + } +} \ No newline at end of file diff --git a/Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs.meta b/Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs.meta new file mode 100644 index 00000000..7e739d73 --- /dev/null +++ b/Assets/SO Architecture/Editor/Drawers/SceneInfoPropertyDrawer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 32913f49a5274d4795151f814b3dc24d +timeCreated: 1555400635 \ No newline at end of file diff --git a/Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs b/Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs new file mode 100644 index 00000000..04e0d022 --- /dev/null +++ b/Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs @@ -0,0 +1,59 @@ +using UnityEditor; +using UnityEngine; + +namespace ScriptableObjectArchitecture.Editor +{ + [CustomEditor(typeof(SceneVariable))] + internal sealed class SceneVariableEditor : BaseVariableEditor + { + // UI + private const string SCENE_NOT_ASSIGNED_WARNING = "Please assign a scene as the current serialized values for " + + "the scene do not resolve to an asset in the project."; + private const string SCENE_NOT_IN_BUILD_SETTINGS_WARNING = + "Scene assigned is not currently in the Build Settings"; + private const string SCENE_NOT_ENABLED_IN_BUILD_SETTINGS_WARNING = + "Scene assigned is present in build settings, but not enabled."; + + // Serialized Properties + private const string SCENE_INFO_PROPERTY = "_value"; + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + DrawValue(); + DrawDeveloperDescription(); + } + protected override void DrawValue() + { + var sceneVariable = (SceneVariable)target; + var sceneInfoProperty = serializedObject.FindProperty(SCENE_INFO_PROPERTY); + if (sceneVariable.Value.Scene == null) + { + EditorGUILayout.HelpBox(SCENE_NOT_ASSIGNED_WARNING, MessageType.Warning); + } + else if (!sceneVariable.Value.IsSceneInBuildSettings) + { + EditorGUILayout.HelpBox(SCENE_NOT_IN_BUILD_SETTINGS_WARNING, MessageType.Warning); + } + else if(!sceneVariable.Value.IsSceneEnabled) + { + EditorGUILayout.HelpBox(SCENE_NOT_ENABLED_IN_BUILD_SETTINGS_WARNING, MessageType.Warning); + } + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(sceneInfoProperty); + if (EditorGUI.EndChangeCheck()) + { + EditorUtility.SetDirty(target); + } + EditorGUILayout.Space(); + EditorGUILayout.Space(); + EditorGUILayout.Space(); + } + + public override bool RequiresConstantRepaint() + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs.meta b/Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs.meta new file mode 100644 index 00000000..d90e671f --- /dev/null +++ b/Assets/SO Architecture/Editor/Inspectors/SceneVariableEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c76dd1dc59a44956a549cab1ec2f6905 +timeCreated: 1555320819 \ No newline at end of file diff --git a/Assets/SO Architecture/References/SceneReference.cs b/Assets/SO Architecture/References/SceneReference.cs new file mode 100644 index 00000000..c5a60fc8 --- /dev/null +++ b/Assets/SO Architecture/References/SceneReference.cs @@ -0,0 +1,13 @@ +namespace ScriptableObjectArchitecture +{ + [System.Serializable] + public sealed class SceneReference : BaseReference + { + public SceneReference() + { + } + public SceneReference(SceneInfo value) : base(value) + { + } + } +} \ No newline at end of file diff --git a/Assets/SO Architecture/References/SceneReference.cs.meta b/Assets/SO Architecture/References/SceneReference.cs.meta new file mode 100644 index 00000000..a0244e1f --- /dev/null +++ b/Assets/SO Architecture/References/SceneReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dfdb025a7a4bc3c4e9314278ae0ae78d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SO Architecture/Variables/SceneVariable.cs b/Assets/SO Architecture/Variables/SceneVariable.cs new file mode 100644 index 00000000..0bbf8895 --- /dev/null +++ b/Assets/SO Architecture/Variables/SceneVariable.cs @@ -0,0 +1,122 @@ +using System; +using UnityEngine; + +namespace ScriptableObjectArchitecture +{ + /// + /// is a scriptable constant variable whose scene values are assigned at + /// edit-time by assigning a instance to it. + /// + [CreateAssetMenu( + fileName = "SceneVariable.asset", + menuName = SOArchitecture_Utility.VARIABLE_SUBMENU + "Scene", + order = 120)] + public sealed class SceneVariable : BaseVariable + { + /// + /// Returns the of this instance. + /// + public override SceneInfo Value + { + get { return _value; } + } + + public override bool ReadOnly + { + get + { + // A scene variable is essentially a constant for edit-time modification only; there is not + // any kind of expectation for a user to be able to set this at runtime. + return true; + } + } + } + + [Serializable] + public sealed class SceneInfo : ISerializationCallbackReceiver + { + /// + /// Returns the fully-qualified name of the scene. + /// + public string SceneName + { + get { return _sceneName; } + } + + /// + /// Returns the index of the scene in the build settings; if not present, -1 will be returned instead. + /// + public int SceneIndex + { + get { return _sceneIndex; } + internal set { _sceneIndex = value; } + } + + /// + /// Returns true if the scene is present in the build settings, otherwise false. + /// + public bool IsSceneInBuildSettings + { + get { return _sceneIndex != -1; } + } + + /// + /// Returns true if the scene is enabled in the build settings, otherwise false. + /// + public bool IsSceneEnabled + { + get { return _isSceneEnabled; } + internal set { _isSceneEnabled = value; } + } + + #if UNITY_EDITOR + internal UnityEditor.SceneAsset Scene + { + get { return UnityEditor.AssetDatabase.LoadAssetAtPath(_sceneName); } + } + #endif + + [SerializeField] + private string _sceneName; + + [SerializeField] + private int _sceneIndex; + + [SerializeField] + private bool _isSceneEnabled; + + public SceneInfo() + { + _sceneIndex = -1; + } + + #region ISerializationCallbackReceiver + + public void OnBeforeSerialize() + { + #if UNITY_EDITOR + if (Scene != null) + { + var sceneAssetPath = UnityEditor.AssetDatabase.GetAssetPath(Scene); + var sceneAssetGUID = UnityEditor.AssetDatabase.AssetPathToGUID(sceneAssetPath); + var scenes = UnityEditor.EditorBuildSettings.scenes; + + SceneIndex = -1; + for (var i = 0; i < scenes.Length; i++) + { + if (scenes[i].guid.ToString() == sceneAssetGUID) + { + SceneIndex = i; + IsSceneEnabled = scenes[i].enabled; + break; + } + } + } + #endif + } + + public void OnAfterDeserialize(){} + + #endregion + } +} diff --git a/Assets/SO Architecture/Variables/SceneVariable.cs.meta b/Assets/SO Architecture/Variables/SceneVariable.cs.meta new file mode 100644 index 00000000..1f2ee049 --- /dev/null +++ b/Assets/SO Architecture/Variables/SceneVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2953c036c3bbfff4283215395edf0cd8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From f665c268e8c03a875f880c05df9c8df2ccb7ab91 Mon Sep 17 00:00:00 2001 From: Jeff Campbell Date: Wed, 17 Apr 2019 09:19:10 +0200 Subject: [PATCH 3/5] Added custom icons for Scene Variable, Collection --- .../Collections/SceneCollection.cs.meta | 2 +- .../Icons/Collections/SceneCollectionIcon.png | Bin 0 -> 4437 bytes .../Collections/SceneCollectionIcon.png.meta | 121 ++++++++++++++++++ .../Icons/Variables/SceneVariableIcon.png | Bin 0 -> 4407 bytes .../Variables/SceneVariableIcon.png.meta | 121 ++++++++++++++++++ .../Variables/SceneVariable.cs.meta | 2 +- 6 files changed, 244 insertions(+), 2 deletions(-) create mode 100644 Assets/SO Architecture/Editor/Icons/Collections/SceneCollectionIcon.png create mode 100644 Assets/SO Architecture/Editor/Icons/Collections/SceneCollectionIcon.png.meta create mode 100644 Assets/SO Architecture/Editor/Icons/Variables/SceneVariableIcon.png create mode 100644 Assets/SO Architecture/Editor/Icons/Variables/SceneVariableIcon.png.meta diff --git a/Assets/SO Architecture/Collections/SceneCollection.cs.meta b/Assets/SO Architecture/Collections/SceneCollection.cs.meta index f0f80303..937bf03d 100644 --- a/Assets/SO Architecture/Collections/SceneCollection.cs.meta +++ b/Assets/SO Architecture/Collections/SceneCollection.cs.meta @@ -5,7 +5,7 @@ MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {instanceID: 0} + icon: {fileID: 2800000, guid: 2914869b4bf78e2498ede5504e93b705, type: 3} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/SO Architecture/Editor/Icons/Collections/SceneCollectionIcon.png b/Assets/SO Architecture/Editor/Icons/Collections/SceneCollectionIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..58213e812303fc3b0a37eb3b6124ebbf0b67da49 GIT binary patch literal 4437 zcmZ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q#uv?Wu>It-eXz0a7bl zP^B@FM8^5Y%a1Cw)~|X=*aGYTR@8k11A|Y0PkyJ&H@Rz;nH0CS-tu1?Q@6Baf;}W; zTVuDC|LJsPg-jrP)ISoo@)dUiStK=!kq*ay=10DM)zZ?s8K00~Y+^Dn6c`-b{~m*X{x`$%J0 zwrDJz+x$9EjhR$L0`NZb2h{JMhUw|(kRNsNJtQ_kbfA)T)A`R7sqH^!l$KpY9M)>!PVFL^S<;I#K^EHrB@K<=?cr$(9l zSe(AmxhQ6R;=wj)< z?Ch*n;dY*UGp{o&PwzTX+PNQ47O7rmQxntgfS%mE^#0OTmo{W+R#_OUhD4-{toniT z1~g`VeeiMgxSM8>C6j`JfTf$Rly%S6ZxtRN9#Wh2{_TCEMB8vjaMY5&srEQEDo_VJ6;m^Xc^_YTB9QvnuSRxNtE?CnYs#n((GV*&*? nQ%P&T{2M|FO&+#%y;4obzmQ+ot}_OIhyc3x4H2~(4ln)(+d5*R literal 0 HcmV?d00001 diff --git a/Assets/SO Architecture/Editor/Icons/Variables/SceneVariableIcon.png.meta b/Assets/SO Architecture/Editor/Icons/Variables/SceneVariableIcon.png.meta new file mode 100644 index 00000000..99dfafda --- /dev/null +++ b/Assets/SO Architecture/Editor/Icons/Variables/SceneVariableIcon.png.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: 9e50d8100875e98459ea1e86d378b9f8 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: -100 + 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: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SO Architecture/Variables/SceneVariable.cs.meta b/Assets/SO Architecture/Variables/SceneVariable.cs.meta index 1f2ee049..269679ac 100644 --- a/Assets/SO Architecture/Variables/SceneVariable.cs.meta +++ b/Assets/SO Architecture/Variables/SceneVariable.cs.meta @@ -5,7 +5,7 @@ MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {instanceID: 0} + icon: {fileID: 2800000, guid: 9e50d8100875e98459ea1e86d378b9f8, type: 3} userData: assetBundleName: assetBundleVariant: From 3b7f6d6839cc2f645858cf16de8d5b755889b2a0 Mon Sep 17 00:00:00 2001 From: Jeff Campbell Date: Fri, 19 Apr 2019 08:37:58 +0200 Subject: [PATCH 4/5] PR Fixes * Modified GetPropertyHeight in BaseReferenceDrawer to only use the inline height calculation if the constant value property height would be greater than a single line. * Modified the width of the popup style button to be a constant fixed width of 25f. This style seems to have an issue when shown in a list that its normal fixed width is obscuring the clickable element and buffing this width to a fixed size makes this area clickable again. --- .../Editor/Drawers/BaseReferenceDrawer.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs b/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs index 8e48adb3..93602852 100644 --- a/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs +++ b/Assets/SO Architecture/Editor/Drawers/BaseReferenceDrawer.cs @@ -50,11 +50,15 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten SerializedProperty variable = property.FindPropertyRelative("_variable"); // Calculate rect for configuration button - Rect buttonRect = new Rect(refValuePosition); + Rect buttonRect = new Rect + { + position = refValuePosition.position, + size = new Vector2(30f, refValuePosition.height) + }; buttonRect.yMin += PopupStyle.margin.top; buttonRect.yMax = buttonRect.yMin + EditorGUIUtility.singleLineHeight; - buttonRect.width = PopupStyle.fixedWidth + PopupStyle.margin.right; - refValuePosition.xMin = buttonRect.xMax; + refValuePosition.position = new Vector2(refValuePosition.x + buttonRect.width, refValuePosition.y); + refValuePosition.size = new Vector2(refValuePosition.width - buttonRect.width, refValuePosition.height); int result = EditorGUI.Popup(buttonRect, useConstant.boolValue ? 0 : 1, popupOptions, PopupStyle); @@ -84,10 +88,10 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { SerializedProperty useConstant = property.FindPropertyRelative("_useConstant"); - return !useConstant.boolValue + var constantPropertyHeight = EditorGUI.GetPropertyHeight(property.FindPropertyRelative("_constantValue")); + return !useConstant.boolValue || constantPropertyHeight <= EditorGUIUtility.singleLineHeight ? EditorGUIUtility.singleLineHeight - : EditorGUIUtility.singleLineHeight * 2f + - EditorGUI.GetPropertyHeight(property.FindPropertyRelative("_constantValue")); + : EditorGUIUtility.singleLineHeight * 2 + constantPropertyHeight; } } } \ No newline at end of file From f4eb0ae68b4e9d7903ef60e838c4f676cfad4c0c Mon Sep 17 00:00:00 2001 From: Jeff Campbell Date: Wed, 17 Apr 2019 08:55:15 +0200 Subject: [PATCH 5/5] PR Test Content * This is content added to make it easier to test this PR in the editor, it can be discarded after reviewing --- Assets/PR Test Content.meta | 8 + Assets/PR Test Content/LoadSceneOnAwake.cs | 19 ++ .../PR Test Content/LoadSceneOnAwake.cs.meta | 3 + Assets/PR Test Content/SceneCollection.asset | 20 ++ .../SceneCollection.asset.meta | 8 + .../PR Test Content/SceneReferenceExample.cs | 20 ++ .../SceneReferenceExample.cs.meta | 11 + Assets/PR Test Content/SceneVariable.asset | 22 ++ .../PR Test Content/SceneVariable.asset.meta | 8 + .../SceneVariableTestScene01.unity | 279 ++++++++++++++++++ .../SceneVariableTestScene01.unity.meta | 7 + .../SceneVariableTestScene02.unity | 144 +++++++++ .../SceneVariableTestScene02.unity.meta | 7 + ProjectSettings/EditorBuildSettings.asset | 9 +- 14 files changed, 562 insertions(+), 3 deletions(-) create mode 100644 Assets/PR Test Content.meta create mode 100644 Assets/PR Test Content/LoadSceneOnAwake.cs create mode 100644 Assets/PR Test Content/LoadSceneOnAwake.cs.meta create mode 100644 Assets/PR Test Content/SceneCollection.asset create mode 100644 Assets/PR Test Content/SceneCollection.asset.meta create mode 100644 Assets/PR Test Content/SceneReferenceExample.cs create mode 100644 Assets/PR Test Content/SceneReferenceExample.cs.meta create mode 100644 Assets/PR Test Content/SceneVariable.asset create mode 100644 Assets/PR Test Content/SceneVariable.asset.meta create mode 100644 Assets/PR Test Content/SceneVariableTestScene01.unity create mode 100644 Assets/PR Test Content/SceneVariableTestScene01.unity.meta create mode 100644 Assets/PR Test Content/SceneVariableTestScene02.unity create mode 100644 Assets/PR Test Content/SceneVariableTestScene02.unity.meta diff --git a/Assets/PR Test Content.meta b/Assets/PR Test Content.meta new file mode 100644 index 00000000..fca6bd9a --- /dev/null +++ b/Assets/PR Test Content.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 918bbf3c68c7e5a418c8cfe26c10b0b2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PR Test Content/LoadSceneOnAwake.cs b/Assets/PR Test Content/LoadSceneOnAwake.cs new file mode 100644 index 00000000..6beb0d03 --- /dev/null +++ b/Assets/PR Test Content/LoadSceneOnAwake.cs @@ -0,0 +1,19 @@ +using ScriptableObjectArchitecture; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace PR_Test_Content +{ + public class LoadSceneOnAwake : MonoBehaviour + { + public SceneReference sceneReference; + + private void Awake() + { + if (sceneReference.Value.IsSceneEnabled && sceneReference.Value.IsSceneInBuildSettings) + { + SceneManager.LoadScene(sceneReference.Value.SceneName, LoadSceneMode.Additive); + } + } + } +} \ No newline at end of file diff --git a/Assets/PR Test Content/LoadSceneOnAwake.cs.meta b/Assets/PR Test Content/LoadSceneOnAwake.cs.meta new file mode 100644 index 00000000..4259e85a --- /dev/null +++ b/Assets/PR Test Content/LoadSceneOnAwake.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1d0ccd726b5e417090a58f635bd78842 +timeCreated: 1555479764 \ No newline at end of file diff --git a/Assets/PR Test Content/SceneCollection.asset b/Assets/PR Test Content/SceneCollection.asset new file mode 100644 index 00000000..9148ab47 --- /dev/null +++ b/Assets/PR Test Content/SceneCollection.asset @@ -0,0 +1,20 @@ +%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: baec154247b223d4a9b1afe90aa2cf2c, type: 3} + m_Name: SceneCollection + m_EditorClassIdentifier: + DeveloperDescription: + _value: + _list: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} diff --git a/Assets/PR Test Content/SceneCollection.asset.meta b/Assets/PR Test Content/SceneCollection.asset.meta new file mode 100644 index 00000000..914e5b5b --- /dev/null +++ b/Assets/PR Test Content/SceneCollection.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a01fef307e3e54c4f9f9a5a360bcde7c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PR Test Content/SceneReferenceExample.cs b/Assets/PR Test Content/SceneReferenceExample.cs new file mode 100644 index 00000000..a2822cbd --- /dev/null +++ b/Assets/PR Test Content/SceneReferenceExample.cs @@ -0,0 +1,20 @@ +using ScriptableObjectArchitecture; +using UnityEngine; + +namespace PR_Test_Content +{ + public class SceneReferenceExample : MonoBehaviour + { + [SerializeField] + private SceneReference _sceneReference; + + [SerializeField] + private SceneReference[] _sceneReferences; + + [SerializeField] + private IntReference _intReference; + + [SerializeField] + private IntReference[] _intReferences; + } +} diff --git a/Assets/PR Test Content/SceneReferenceExample.cs.meta b/Assets/PR Test Content/SceneReferenceExample.cs.meta new file mode 100644 index 00000000..8f021db0 --- /dev/null +++ b/Assets/PR Test Content/SceneReferenceExample.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 91d5d96301f0f3d4e8d7f840003201c0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PR Test Content/SceneVariable.asset b/Assets/PR Test Content/SceneVariable.asset new file mode 100644 index 00000000..7766190f --- /dev/null +++ b/Assets/PR Test Content/SceneVariable.asset @@ -0,0 +1,22 @@ +%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: 2953c036c3bbfff4283215395edf0cd8, type: 3} + m_Name: SceneVariable + m_EditorClassIdentifier: + DeveloperDescription: + _value: + _value: + _sceneName: Assets/PR Test Content/SceneVariableTestScene02.unity + _sceneIndex: -1 + _isSceneEnabled: 0 + _readOnly: 0 + _raiseWarning: 1 diff --git a/Assets/PR Test Content/SceneVariable.asset.meta b/Assets/PR Test Content/SceneVariable.asset.meta new file mode 100644 index 00000000..0aa3e21a --- /dev/null +++ b/Assets/PR Test Content/SceneVariable.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52ab94cf1eb99514b8853faaeb2f01b0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PR Test Content/SceneVariableTestScene01.unity b/Assets/PR Test Content/SceneVariableTestScene01.unity new file mode 100644 index 00000000..d9076b00 --- /dev/null +++ b/Assets/PR Test Content/SceneVariableTestScene01.unity @@ -0,0 +1,279 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &339082748 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 339082751} + - component: {fileID: 339082749} + - component: {fileID: 339082750} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &339082749 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339082748} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 91d5d96301f0f3d4e8d7f840003201c0, type: 3} + m_Name: + m_EditorClassIdentifier: + _sceneReference: + _useConstant: 1 + _constantValue: + _sceneName: 'Assets/SO Architecture/Examples/Scenes/Example #01 - References.unity' + _sceneIndex: -1 + _isSceneEnabled: 0 + _variable: {fileID: 0} + _sceneReferences: + - _useConstant: 1 + _constantValue: + _sceneName: + _sceneIndex: -1 + _isSceneEnabled: 0 + _variable: {fileID: 0} + - _useConstant: 0 + _constantValue: + _sceneName: + _sceneIndex: -1 + _isSceneEnabled: 0 + _variable: {fileID: 0} +--- !u!114 &339082750 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339082748} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d0ccd726b5e417090a58f635bd78842, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneReference: + _useConstant: 0 + _constantValue: + _sceneName: + _sceneIndex: -1 + _isSceneEnabled: 0 + _variable: {fileID: 11400000, guid: 52ab94cf1eb99514b8853faaeb2f01b0, type: 2} +--- !u!4 &339082751 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339082748} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1599633961 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1599633964} + - component: {fileID: 1599633963} + - component: {fileID: 1599633962} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1599633962 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599633961} + m_Enabled: 1 +--- !u!20 &1599633963 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599633961} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1599633964 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599633961} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + 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} diff --git a/Assets/PR Test Content/SceneVariableTestScene01.unity.meta b/Assets/PR Test Content/SceneVariableTestScene01.unity.meta new file mode 100644 index 00000000..4c7e02ee --- /dev/null +++ b/Assets/PR Test Content/SceneVariableTestScene01.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 100aa01d425663b4da3e0be46274f307 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PR Test Content/SceneVariableTestScene02.unity b/Assets/PR Test Content/SceneVariableTestScene02.unity new file mode 100644 index 00000000..47016bfe --- /dev/null +++ b/Assets/PR Test Content/SceneVariableTestScene02.unity @@ -0,0 +1,144 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &440539726 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 440539727} + m_Layer: 0 + m_Name: Bar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &440539727 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 440539726} + 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} diff --git a/Assets/PR Test Content/SceneVariableTestScene02.unity.meta b/Assets/PR Test Content/SceneVariableTestScene02.unity.meta new file mode 100644 index 00000000..a131fcf1 --- /dev/null +++ b/Assets/PR Test Content/SceneVariableTestScene02.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 96e19de034d930845b2a4755ec9127c2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 9bd6d101..a18f0fbf 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -5,7 +5,10 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 0 - path: - guid: 00000000000000000000000000000000 + - enabled: 1 + path: Assets/PR Test Content/SceneVariableTestScene01.unity + guid: 100aa01d425663b4da3e0be46274f307 + - enabled: 1 + path: Assets/PR Test Content/SceneVariableTestScene02.unity + guid: 96e19de034d930845b2a4755ec9127c2 m_configObjects: {}