-
Notifications
You must be signed in to change notification settings - Fork 168
[UUM-137643] Fix compilation errors and warnings #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f5e2185
b0bd17c
42224b6
33c5f94
52abb9f
12f0896
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,9 @@ static IEnumerable<T> GetTargets<T>(this AlembicRecorderSettings settings) where | |
| { | ||
| return settings.TargetBranch != null ? settings.TargetBranch.GetComponentsInChildren<T>() : Enumerable.Empty<T>(); | ||
| } | ||
| #if UNITY_2023_1_OR_NEWER | ||
| #if UNITY_6000_4_OR_NEWER | ||
| return Object.FindObjectsByType<T>(); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The I was tempted to remove it in |
||
| #elif UNITY_2023_1_OR_NEWER | ||
| return Object.FindObjectsByType<T>(FindObjectsSortMode.InstanceID); | ||
| #else | ||
| return Object.FindObjectsOfType<T>(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -546,7 +546,11 @@ public override void Setup(Component c) | |
| m_target = null; | ||
| return; | ||
| } | ||
| #if UNITY_6000_4_OR_NEWER | ||
| abcObject = parent.abcObject.NewXform(target.name + " (" + EntityId.ToULong(target.GetEntityId()).ToString("X8") + ")", timeSamplingIndex); | ||
| #else | ||
| abcObject = parent.abcObject.NewXform(target.name + " (" + target.GetInstanceID().ToString("X8") + ")", timeSamplingIndex); | ||
| #endif | ||
| m_target = target; | ||
| } | ||
|
|
||
|
|
@@ -952,11 +956,15 @@ Component[] GetTargets(Type type) | |
| { | ||
| if (m_settings.Scope == ExportScope.TargetBranch && TargetBranch != null) | ||
| return TargetBranch.GetComponentsInChildren(type); | ||
| else | ||
| #if UNITY_2023_1_OR_NEWER | ||
| return Array.ConvertAll<UnityEngine.Object, Component>(GameObject.FindObjectsByType(type, FindObjectsSortMode.InstanceID), e => (Component)e); | ||
|
|
||
| #if UNITY_6000_4_OR_NEWER | ||
| var objects = GameObject.FindObjectsByType(type); | ||
| Array.Sort(objects, (a, b) => EntityId.ToULong(a.GetEntityId()).CompareTo(EntityId.ToULong(b.GetEntityId()))); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FindObjectsSortMode.InstanceID was used to provide a deterministic ordering needed in |
||
| return Array.ConvertAll<UnityEngine.Object, Component>(objects, e => (Component)e); | ||
| #elif UNITY_2023_1_OR_NEWER | ||
| return Array.ConvertAll<UnityEngine.Object, Component>(GameObject.FindObjectsByType(type, FindObjectsSortMode.InstanceID), e => (Component)e); | ||
| #else | ||
| return Array.ConvertAll<UnityEngine.Object, Component>(GameObject.FindObjectsOfType(type), e => (Component)e); | ||
| return Array.ConvertAll<UnityEngine.Object, Component>(GameObject.FindObjectsOfType(type), e => (Component)e); | ||
| #endif | ||
| } | ||
|
|
||
|
|
@@ -974,7 +982,11 @@ CaptureNode ConstructTree(Transform node) | |
| { | ||
| if (node == null) { return null; } | ||
|
|
||
| #if UNITY_6000_4_OR_NEWER | ||
| int iid = (int)EntityId.ToULong(node.gameObject.GetEntityId()); | ||
| #else | ||
| int iid = node.gameObject.GetInstanceID(); | ||
| #endif | ||
| CaptureNode cn; | ||
| if (m_nodes.TryGetValue(iid, out cn)) { return cn; } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,5 +16,5 @@ | |
| ], | ||
| "name": "com.unity.formats.alembic", | ||
| "unity": "2021.3", | ||
| "version": "2.4.4" | ||
| "version": "2.4.5" | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we also remove this and upgrade the minimum unity version to 6000.0?
Same with romotion_test_editors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the minimum version of the package, so we have to keep the job for promotion.