Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9cd83fb
Unity 2023.1.0a21 C# reference source code
Nov 30, 2022
016297e
Unity 2023.1.0a22 C# reference source code
Dec 7, 2022
9436b69
Unity 2023.1.0a23 C# reference source code
Dec 14, 2022
a935c76
Unity 2023.1.0a24 C# reference source code
Dec 22, 2022
664dfe3
Unity 2023.1.0a25 C# reference source code
Jan 11, 2023
a2bdfe9
Unity 2023.1.0a26 C# reference source code
Jan 18, 2023
8a74505
Unity 2023.1.0b1 C# reference source code
Jan 24, 2023
3ff5b7b
Unity 2023.1.0b2 C# reference source code
Feb 1, 2023
963b05b
Unity 2023.1.0b3 C# reference source code
Feb 8, 2023
90a5624
Unity 2023.1.0b4 C# reference source code
Feb 16, 2023
70abf50
Unity 2023.1.0b5 C# reference source code
Feb 22, 2023
a6fa517
Unity 2023.1.0b6 C# reference source code
Mar 2, 2023
a6e2578
Unity 2023.1.0b7 C# reference source code
Mar 7, 2023
2fb1127
Unity 2023.1.0b8 C# reference source code
Mar 15, 2023
1567437
Unity 2023.1.0b9 C# reference source code
Mar 22, 2023
8b1f8dc
Unity 2023.1.0b10 C# reference source code
Mar 29, 2023
e5b2abf
Unity 2023.1.0b11 C# reference source code
Apr 4, 2023
4226f55
Unity 2023.1.0b12 C# reference source code
Apr 12, 2023
631591b
Unity 2023.1.0b13 C# reference source code
Apr 19, 2023
a5d0b29
Unity 2023.1.0b14 C# reference source code
Apr 26, 2023
90ce2e1
Unity 2023.1.0b15 C# reference source code
May 4, 2023
7dbe366
Unity 2023.1.0b16 C# reference source code
May 11, 2023
aadcd81
Unity 2023.1.0b17 C# reference source code
May 17, 2023
bf375b4
Unity 2023.1.0b18 C# reference source code
May 24, 2023
6a4c1ee
Unity 2023.1.0b19 C# reference source code
May 31, 2023
6890b2c
Unity 2023.1.0b20 C# reference source code
Jun 7, 2023
600c3d6
Unity 2023.1.0f1 C# reference source code
Jun 12, 2023
44b9fbc
Unity 2023.1.1f1 C# reference source code
Jun 21, 2023
dd03a8a
Unity 2023.1.2f1 C# reference source code
Jun 26, 2023
71eed5c
Unity 2023.1.3f1 C# reference source code
Jul 5, 2023
e007399
Unity 2023.1.4f1 C# reference source code
Jul 13, 2023
0e2897c
Unity 2023.1.5f1 C# reference source code
Jul 18, 2023
3c2fa5a
Unity 2023.1.6f1 C# reference source code
Jul 25, 2023
a22a928
Unity 2023.1.7f1 C# reference source code
Aug 1, 2023
1a48b2a
Unity 2023.1.8f1 C# reference source code
Aug 8, 2023
550f1ed
Unity 2023.1.9f1 C# reference source code
Aug 15, 2023
dac98d8
Unity 2023.1.10f1 C# reference source code
Aug 22, 2023
ff4b5f9
Unity 2023.1.11f1 C# reference source code
Aug 29, 2023
86c946b
Unity 2023.1.12f1 C# reference source code
Sep 5, 2023
5752a80
Unity 2023.1.13f1 C# reference source code
Sep 12, 2023
4cd47d8
Unity 2023.1.14f1 C# reference source code
Sep 19, 2023
14223cb
Unity 2023.1.15f1 C# reference source code
Sep 26, 2023
1e328e0
Unity 2023.1.16f1 C# reference source code
Oct 3, 2023
7f1a3ad
Unity 2023.1.17f1 C# reference source code
Oct 17, 2023
1f063f8
Unity 2023.1.18f1 C# reference source code
Oct 24, 2023
4764d77
Unity 2023.1.19f1 C# reference source code
Oct 31, 2023
537b1b4
Unity 2023.1.20f1 C# reference source code
Nov 9, 2023
e0eb428
Update Program.cs
Thaina Nov 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<EnableDefaultItems>false</EnableDefaultItems>
<LangVersion>latest</LangVersion>
<NoWarn>1071</NoWarn>
<NoWarn>1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="Data.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class PlayerBuildConfig
public string ApplicationIdentifier;
public string Architecture;
public ScriptingBackend ScriptingBackend;
public bool NoGUID;
public bool InstallIntoBuildsFolder;
public bool GenerateIdeProject;
public bool Development;
Expand All @@ -60,6 +61,7 @@ public class PlayerBuildConfig
public class BuiltFilesOutput
{
public string[] Files = new string[0];
public string BootConfigArtifact;
}

public class LinkerConfig
Expand Down Expand Up @@ -97,6 +99,8 @@ public class Il2CppConfig
public string SysRootPath;
public string ToolChainPath;
public string RelativeDataPath;
public bool GenerateUsymFile;
public string UsymtoolPath;
}

public class Services
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<EnableDefaultItems>false</EnableDefaultItems>
<LangVersion>latest</LangVersion>
<NoWarn>1071</NoWarn>
<NoWarn>1701</NoWarn>
<AssemblyName>PlayerBuildProgramLibrary.Data</AssemblyName>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<EnableDefaultItems>false</EnableDefaultItems>
<LangVersion>latest</LangVersion>
<NoWarn>1071</NoWarn>
<NoWarn>1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="Data.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Editor/Mono/ActiveEditorTracker.bindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override int GetHashCode()
public Editor[] activeEditors { get { return (Editor[])Internal_GetActiveEditors(this); } }

[FreeFunction]
internal static extern void Internal_GetActiveEditorsNonAlloc(ActiveEditorTracker self, Editor[] editors);
internal static extern void Internal_GetActiveEditorsNonAlloc(ActiveEditorTracker self, [Unmarshalled] Editor[] editors);

// List<T> version
internal void GetObjectsLockedByThisTracker(List<UnityObject> lockedObjects)
Expand Down
8 changes: 5 additions & 3 deletions Editor/Mono/Animation/AnimationUtility.bindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static AnimationClip[] GetAnimationClips(GameObject gameObject)
extern internal static AnimationClip[] GetAnimationClipsInAnimationPlayer([NotNull] GameObject gameObject);

// Sets the array of AnimationClips to be referenced in the Animation component
extern public static void SetAnimationClips([NotNull] Animation animation, AnimationClip[] clips);
extern public static void SetAnimationClips([NotNull] Animation animation, [Unmarshalled] AnimationClip[] clips);

public static EditorCurveBinding[] GetAnimatableBindings(GameObject targetObject, GameObject root)
{
Expand Down Expand Up @@ -201,7 +201,7 @@ public static Type PropertyModificationToEditorCurveBinding(PropertyModification

extern public static ObjectReferenceKeyframe[] GetObjectReferenceCurve([NotNull] AnimationClip clip, EditorCurveBinding binding);

public static void SetObjectReferenceCurve(AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes)
public static void SetObjectReferenceCurve(AnimationClip clip, EditorCurveBinding binding, [Unmarshalled]ObjectReferenceKeyframe[] keyframes)
{
Internal_SetObjectReferenceCurve(clip, binding, keyframes, true);
Internal_InvokeOnCurveWasModified(clip, binding, keyframes != null ? CurveModifiedType.CurveModified : CurveModifiedType.CurveDeleted);
Expand Down Expand Up @@ -232,7 +232,7 @@ internal static void SetObjectReferenceCurveNoSync(AnimationClip clip, EditorCur
}

[NativeThrows]
extern private static void Internal_SetObjectReferenceCurve([NotNull] AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes, bool updateMuscleClip);
extern private static void Internal_SetObjectReferenceCurve([NotNull] AnimationClip clip, EditorCurveBinding binding, [Unmarshalled] ObjectReferenceKeyframe[] keyframes, bool updateMuscleClip);

extern public static AnimationCurve GetEditorCurve([NotNull] AnimationClip clip, EditorCurveBinding binding);

Expand Down Expand Up @@ -270,6 +270,8 @@ internal static void SetEditorCurveNoSync(AnimationClip clip, EditorCurveBinding
[NativeThrows]
extern private static void Internal_SetEditorCurve([NotNull] AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve, bool syncEditorCurves);

extern internal static bool IsDiscreteIntBinding(EditorCurveBinding binding);

extern internal static void SyncEditorCurves([NotNull] AnimationClip clip);

private static void Internal_InvokeOnCurveWasModified(AnimationClip clip, EditorCurveBinding binding, CurveModifiedType type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ private List<AnimationWindowKeyframe> GetKeys(PropertyModification[] modificatio
int keyIndex = curve.GetKeyframeIndex(state.time);
if (keyIndex >= 0)
{
keys.Add(curve.m_Keyframes[keyIndex]);
keys.Add(curve.keyframes[keyIndex]);
}
}
}
Expand Down
31 changes: 12 additions & 19 deletions Editor/Mono/Animation/AnimationWindow/AnimationWindowCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal class AnimationWindowCurve : IComparable<AnimationWindowCurve>, IEquata
{
public const float timeEpsilon = 0.00001f;

public List<AnimationWindowKeyframe> m_Keyframes;
private List<AnimationWindowKeyframe> m_Keyframes;

private EditorCurveBinding m_Binding;
private int m_BindingHashCode;
Expand Down Expand Up @@ -46,6 +46,8 @@ internal class AnimationWindowCurve : IComparable<AnimationWindowCurve>, IEquata
public bool animationIsEditable { get { return m_SelectionBinding != null ? m_SelectionBinding.animationIsEditable : true; } }
public int selectionID { get { return m_SelectionBinding != null ? m_SelectionBinding.id : 0; } }

public IReadOnlyList<AnimationWindowKeyframe> keyframes => m_Keyframes;

private object defaultValue
{
get
Expand Down Expand Up @@ -190,17 +192,10 @@ public AnimationCurve ToAnimationCurve()
AnimationCurve animationCurve = new AnimationCurve();
List<Keyframe> keys = new List<Keyframe>();

float lastFrameTime = float.MinValue;

for (int i = 0; i < length; i++)
{
// Make sure we don't get two keyframes in an exactly the same time. We just ignore those.
if (Mathf.Abs(m_Keyframes[i].time - lastFrameTime) > AnimationWindowCurve.timeEpsilon)
{
Keyframe newKeyframe = m_Keyframes[i].ToKeyframe();
keys.Add(newKeyframe);
lastFrameTime = m_Keyframes[i].time;
}
Keyframe newKeyframe = m_Keyframes[i].ToKeyframe();
keys.Add(newKeyframe);
}

animationCurve.keys = keys.ToArray();
Expand All @@ -212,17 +207,10 @@ public ObjectReferenceKeyframe[] ToObjectCurve()
int length = m_Keyframes.Count;
List<ObjectReferenceKeyframe> keys = new List<ObjectReferenceKeyframe>();

float lastFrameTime = float.MinValue;

for (int i = 0; i < length; i++)
{
// Make sure we don't get two keyframes in an exactly the same time. We just ignore those.
if (Mathf.Abs(m_Keyframes[i].time - lastFrameTime) > AnimationWindowCurve.timeEpsilon)
{
ObjectReferenceKeyframe newKeyframe = m_Keyframes[i].ToObjectReferenceKeyframe();
lastFrameTime = newKeyframe.time;
keys.Add(newKeyframe);
}
ObjectReferenceKeyframe newKeyframe = m_Keyframes[i].ToObjectReferenceKeyframe();
keys.Add(newKeyframe);
}

keys.Sort((a, b) => a.time.CompareTo(b.time));
Expand Down Expand Up @@ -301,6 +289,11 @@ public void RemoveKeyframe(AnimationKeyTime time)
}
}

public void RemoveKeyframe(AnimationWindowKeyframe keyframe)
{
m_Keyframes.Remove(keyframe);
}

public bool HasKeyframe(AnimationKeyTime time)
{
return GetKeyframeIndex(time) != -1;
Expand Down
42 changes: 39 additions & 3 deletions Editor/Mono/Animation/AnimationWindow/AnimationWindowEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,46 @@

namespace UnityEditor
{
internal struct AnimationWindowEventMethod
/// <summary>
/// Holds the context for AnimationEvent editing.
/// </summary>
class AnimationEventEditorState
{
public string name;
public Type parameterType;
static bool s_ShowOverloadedFunctionsDetails = true;
static bool s_ShowDuplicatedFunctionsDetails = true;

bool m_ShowOverloadedFunctionsDetails = s_ShowOverloadedFunctionsDetails;
bool m_ShowDuplicatedFunctionsDetails = s_ShowDuplicatedFunctionsDetails;

/// <summary>
/// Used to track whether or not to show extra details about duplicated function names found in among the potential supported functions
/// </summary>
public bool ShowOverloadedFunctionsDetails
{
get => m_ShowOverloadedFunctionsDetails;
set
{
m_ShowOverloadedFunctionsDetails = s_ShowOverloadedFunctionsDetails = value;
}
}

/// <summary>
/// Used to track whether or not to show extra details about overloaded function names found in among the potential supported functions
/// </summary>
public bool ShowDuplicatedFunctionsDetails
{
get => m_ShowDuplicatedFunctionsDetails;
set
{
m_ShowDuplicatedFunctionsDetails = s_ShowDuplicatedFunctionsDetails = value;
}
}

public AnimationEventEditorState()
{
m_ShowOverloadedFunctionsDetails = s_ShowOverloadedFunctionsDetails;
m_ShowDuplicatedFunctionsDetails = s_ShowDuplicatedFunctionsDetails;
}
}

internal class AnimationWindowEvent : ScriptableObject
Expand Down
Loading