Skip to content

Commit 59cf22c

Browse files
author
Unity Technologies
committed
Unity 2018.4.2f1 C# reference source code
1 parent bad6201 commit 59cf22c

16 files changed

Lines changed: 71 additions & 22 deletions

File tree

Editor/Mono/Inspector/GameObjectInspector.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,9 @@ public override void OnPreviewGUI(Rect r, GUIStyle background)
822822
DoRenderPreview();
823823
previewUtility.EndAndDrawPreview(r);
824824
var copy = new RenderTexture(previewUtility.renderTexture);
825-
Graphics.CopyTexture(previewUtility.renderTexture, copy);
825+
var previous = RenderTexture.active;
826+
Graphics.Blit(previewUtility.renderTexture, copy);
827+
RenderTexture.active = previous;
826828
m_PreviewCache.Add(referenceTargetIndex, copy);
827829
}
828830
}

Editor/Mono/Inspector/LineRendererEditor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ private void InternalOnSceneView()
483483
{
484484
case EditMode.SceneViewEditMode.LineRendererEdit:
485485
m_PointEditor.EditSceneGUI();
486+
487+
// We need to wait for m_Positions to be updated next frame or we risk calling SetSelection with invalid indexes.
488+
if (m_PointEditor.Count != m_Positions.arraySize)
489+
break;
490+
486491
if (m_Positions.arraySize != m_PositionsView.GetRows().Count)
487492
{
488493
m_PositionsView.Reload();

Editor/Mono/PerceptionRemoting/HolographicEmulation/HolographicEmulationWindow.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ internal class HolographicEmulationWindow : EditorWindow
2525
[SerializeField]
2626
private EmulationMode m_Mode = EmulationMode.None;
2727
[SerializeField]
28+
private RemoteDeviceVersion m_DeviceVersion = RemoteDeviceVersion.V1;
29+
[SerializeField]
2830
private int m_RoomIndex = 0;
2931
[SerializeField]
3032
private GestureHand m_Hand = GestureHand.Right;
@@ -43,6 +45,7 @@ internal class HolographicEmulationWindow : EditorWindow
4345

4446
private static GUIContent s_ConnectionStatusText = EditorGUIUtility.TrTextContent("Connection Status");
4547
private static GUIContent s_EmulationModeText = EditorGUIUtility.TrTextContent("Emulation Mode");
48+
private static GUIContent s_DeviceVersionText = EditorGUIUtility.TrTextContent("Device Version");
4649
private static GUIContent s_RoomText = EditorGUIUtility.TrTextContent("Room");
4750
private static GUIContent s_HandText = EditorGUIUtility.TrTextContent("Gesture Hand");
4851
private static GUIContent s_RemoteMachineText = EditorGUIUtility.TrTextContent("Remote Machine");
@@ -64,6 +67,12 @@ internal class HolographicEmulationWindow : EditorWindow
6467
EditorGUIUtility.TrTextContent("Simulate in Editor")
6568
};
6669

70+
private static GUIContent[] s_DeviceVersionStrings = new GUIContent[]
71+
{
72+
EditorGUIUtility.TrTextContent("HoloLens (1st Gen)"),
73+
EditorGUIUtility.TrTextContent("HoloLens 2")
74+
};
75+
6776
private static GUIContent[] s_RoomStrings = new GUIContent[]
6877
{
6978
EditorGUIUtility.TrTextContent("None"),
@@ -235,6 +244,9 @@ private void UpdateRemoteMachineHistory()
235244

236245
private void RemotingPreferencesOnGUI()
237246
{
247+
m_DeviceVersion = (RemoteDeviceVersion)EditorGUILayout.Popup(s_DeviceVersionText, (int)m_DeviceVersion, s_DeviceVersionStrings);
248+
PerceptionRemoting.SetRemoteDeviceVersion(m_DeviceVersion);
249+
238250
EditorGUI.BeginChangeCheck();
239251
m_RemoteMachineAddress = EditorGUILayout.DelayedTextFieldDropDown(s_RemoteMachineText, m_RemoteMachineAddress, m_RemoteMachineHistory);
240252
if (EditorGUI.EndChangeCheck())

Extensions/Networking/Weaver/UNetWeaver.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{709222FD-15C2-497D-8B31-366ADCC074CD}</ProjectGuid>
6+
77
<OutputType>Library</OutputType>
88
<RootNamespace>Unity.UNetWeaver</RootNamespace>
99
<AssemblyName>Unity.UNetWeaver</AssemblyName>

Modules/AssetPipelineEditor/ImportSettings/ModelImporterRigEditor.cs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,27 @@ void GenericGUI()
262262
EditorGUI.BeginChangeCheck();
263263
using (new EditorGUI.DisabledScope(!m_CanMultiEditTransformList))
264264
{
265-
rootIndex = EditorGUILayout.Popup(Styles.RootNode, rootIndex, m_RootMotionBoneList);
266-
}
267-
if (EditorGUI.EndChangeCheck())
268-
{
269-
if (rootIndex > 0 && rootIndex < m_RootMotionBoneList.Length)
265+
if (assetTarget == null)
270266
{
271267
m_RootMotionBoneName.stringValue =
272-
FileUtil.GetLastPathNameComponent(m_RootMotionBoneList[rootIndex].text);
268+
EditorGUILayout.TextField(Styles.RootNode, m_RootMotionBoneName.stringValue);
273269
}
274270
else
271+
rootIndex = EditorGUILayout.Popup(Styles.RootNode, rootIndex, m_RootMotionBoneList);
272+
}
273+
if (EditorGUI.EndChangeCheck())
274+
{
275+
if (assetTarget != null)
275276
{
276-
m_RootMotionBoneName.stringValue = "";
277+
if (rootIndex > 0 && rootIndex < m_RootMotionBoneList.Length)
278+
{
279+
m_RootMotionBoneName.stringValue =
280+
FileUtil.GetLastPathNameComponent(m_RootMotionBoneList[rootIndex].text);
281+
}
282+
else
283+
{
284+
m_RootMotionBoneName.stringValue = "";
285+
}
277286
}
278287
}
279288
}

Projects/CSharp/UnityEditor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{016C8D73-3641-47FB-8D33-7A015A7EC7DB}</ProjectGuid>
7+
88
<OutputType>Library</OutputType>
99
<RootNamespace>UnityEditor</RootNamespace>
1010
<AssemblyName>UnityEditor</AssemblyName>

Projects/CSharp/UnityEngine.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{F0499708-3EB6-4026-8362-97E6FFC4E7C8}</ProjectGuid>
7+
88
<OutputType>Library</OutputType>
99
<RootNamespace>UnityEngine</RootNamespace>
1010
<AssemblyName>UnityEngine</AssemblyName>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Unity 2018.4.1f1 C# reference source code
1+
## Unity 2018.4.2f1 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.

Runtime/Export/Director/IPlayableBehaviour.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,31 @@
33
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
44

55
using System;
6-
using System.Reflection;
76
using UnityEngine;
8-
using UnityEngineInternal;
9-
using RequiredByNativeCodeAttribute = UnityEngine.Scripting.RequiredByNativeCodeAttribute;
7+
using UnityEngine.Scripting;
108

119
namespace UnityEngine.Playables
1210
{
1311
public interface IPlayableBehaviour
1412
{
13+
[RequiredByNativeCode]
1514
void OnGraphStart(Playable playable);
15+
[RequiredByNativeCode]
1616
void OnGraphStop(Playable playable);
1717

18+
[RequiredByNativeCode]
1819
void OnPlayableCreate(Playable playable);
20+
[RequiredByNativeCode]
1921
void OnPlayableDestroy(Playable playable);
2022

23+
[RequiredByNativeCode]
2124
void OnBehaviourPlay(Playable playable, FrameData info);
25+
[RequiredByNativeCode]
2226
void OnBehaviourPause(Playable playable, FrameData info);
2327

28+
[RequiredByNativeCode]
2429
void PrepareFrame(Playable playable, FrameData info);
30+
[RequiredByNativeCode]
2531
void ProcessFrame(Playable playable, FrameData info, object playerData);
2632
}
2733
}

Runtime/Export/Director/PlayableBehaviour.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
44

55
using System;
6-
using System.Reflection;
76
using UnityEngine;
8-
using UnityEngineInternal;
9-
using RequiredByNativeCodeAttribute = UnityEngine.Scripting.RequiredByNativeCodeAttribute;
7+
using UnityEngine.Scripting;
108

119
namespace UnityEngine.Playables
1210
{

0 commit comments

Comments
 (0)