Skip to content

Commit e3286f1

Browse files
author
Unity Technologies
committed
Unity 2017.4.28f1 C# reference source code
1 parent 7f45d1d commit e3286f1

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

Editor/Mono/SettingsWindow/LightingEditor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ private void DrawGUI()
122122
InitSettings();
123123
}
124124

125+
m_RenderSettings.UpdateIfRequiredOrScript();
126+
125127
Material skyboxMaterial = m_SkyboxMaterial.objectReferenceValue as Material;
126128

127129
m_bShowEnvironment = EditorGUILayout.FoldoutTitlebar(m_bShowEnvironment, Styles.env_top, true);
@@ -235,6 +237,8 @@ private void DrawGUI()
235237
EditorGUI.indentLevel--;
236238
EditorGUILayout.Space();
237239
}
240+
241+
m_RenderSettings.ApplyModifiedProperties();
238242
}
239243

240244
public override void OnInspectorGUI()

Editor/Src/VR/Mono/Oculus/VRCustomOptionsOculus.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ internal class VRCustomOptionsOculus : VRCustomOptions
1313
{
1414
static GUIContent s_SharedDepthBufferLabel = EditorGUIUtility.TextContent("Shared Depth Buffer|Enable depth buffer submission to allow for overlay depth occlusion, etc.");
1515
static GUIContent s_DashSupportLabel = EditorGUIUtility.TextContent("Dash Support|If enabled, pressing the home button brings up Dash, otherwise it brings up the older universal menu.");
16+
static GUIContent s_V2SigningLabel = EditorGUIUtility.TextContent("V2 Signing (Quest)|Enable APK v2 signing if building for Oculus Quest. Disable v2 signing if building for Gear VR or Oculus Go.");
1617

1718
SerializedProperty m_SharedDepthBuffer;
1819
SerializedProperty m_DashSupport;
20+
SerializedProperty m_V2Signing;
1921

2022
public override void Initialize(SerializedObject settings)
2123
{
@@ -27,6 +29,7 @@ public override void Initialize(SerializedObject settings, string propertyName)
2729
base.Initialize(settings, propertyName);
2830
m_SharedDepthBuffer = FindPropertyAssert("sharedDepthBuffer");
2931
m_DashSupport = FindPropertyAssert("dashSupport");
32+
m_V2Signing = FindPropertyAssert("v2Signing");
3033
}
3134

3235
public override Rect Draw(BuildTargetGroup target, Rect rect)
@@ -57,15 +60,25 @@ public override Rect Draw(BuildTargetGroup target, Rect rect)
5760
EditorGUI.EndProperty();
5861

5962
EditorGUI.EndDisabled();
60-
6163
rect.y += rect.height + EditorGUIUtility.standardVerticalSpacing;
64+
EditorGUI.BeginDisabled(target != BuildTargetGroup.Android);
65+
rect.height = EditorGUIUtility.singleLineHeight;
66+
label = EditorGUI.BeginProperty(rect, s_V2SigningLabel, m_V2Signing);
67+
EditorGUI.BeginChangeCheck();
68+
boolValue = EditorGUI.Toggle(rect, label, m_V2Signing.boolValue);
69+
if (EditorGUI.EndChangeCheck())
70+
{
71+
m_V2Signing.boolValue = boolValue;
72+
}
73+
EditorGUI.EndProperty();
74+
EditorGUI.EndDisabled();
6275

6376
return rect;
6477
}
6578

6679
public override float GetHeight()
6780
{
68-
return (EditorGUIUtility.singleLineHeight * 2.0f) + (EditorGUIUtility.standardVerticalSpacing * 3.0f);
81+
return (EditorGUIUtility.singleLineHeight * 3.0f) + (EditorGUIUtility.standardVerticalSpacing * 3.0f);
6982
}
7083
}
7184
}

Editor/Src/VR/ScriptBindings/VREditor.bindings.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ public static extern bool dashSupport
6161
[NativeMethod("SetOculusDashSupportEnabled")]
6262
set;
6363
}
64+
65+
public static extern bool v2Signing
66+
{
67+
[NativeMethod("GetOculusV2SigningEnabled")]
68+
get;
69+
[NativeMethod("SetOculusV2SigningEnabled")]
70+
set;
71+
}
6472
}
6573
}
6674

@@ -83,6 +91,12 @@ public static bool dashSupport
8391
get { return UnityEditorInternal.PlayerSettingsOculus.dashSupport; }
8492
set { UnityEditorInternal.PlayerSettingsOculus.dashSupport = value; }
8593
}
94+
95+
public static bool v2Signing
96+
{
97+
get { return UnityEditorInternal.PlayerSettingsOculus.v2Signing; }
98+
set { UnityEditorInternal.PlayerSettingsOculus.v2Signing = value; }
99+
}
86100
}
87101
}
88102
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Unity 2017.4.27f1 C# reference source code
1+
## Unity 2017.4.28f1 C# reference source code
22

33
The C# part of the Unity engine and editor source code.
44
May be used for reference purposes only.

0 commit comments

Comments
 (0)