Skip to content

Commit

Permalink
Add UnityGLTF extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ammaraskar committed May 16, 2024
1 parent ad6009d commit d0ca1fe
Show file tree
Hide file tree
Showing 10 changed files with 348 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Assets/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions Assets/Resources/UnityGLTFSettings.asset

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Resources/UnityGLTFSettings.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Assets/Scripts/OpenTS2/Engine/Tests/SimAnimationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ private void Start()
// Remove ikpole, ikctr and handcontrol objects from the baked sim.
foreach (var bone in _bakedSim.Scenegraph.transform.Find("auskel").GetComponentsInChildren<Transform>())
{
Debug.Log($"bone name: {bone.name}");
if (bone.name.Contains("ikctr") || bone.name.Contains("ikpole"))
{
UnityEngine.Object.DestroyImmediate(bone.gameObject);
Expand Down Expand Up @@ -211,7 +210,6 @@ IEnumerator BakeAnimationIntoNewAnimation(string animName, ScenegraphAnimationAs
var relativeBonePath = _sim.Scenegraph.BoneNamesToRelativePaths[entry.Key];
relativeBonePath = relativeBonePath.Replace("auskel/", "");
var posAndRot = entry.Value;
Debug.Log(relativeBonePath);

bakedClip.SetCurve(relativeBonePath, typeof(Transform), "localPosition.x", new AnimationCurve(posAndRot.PosX.ToArray()));
bakedClip.SetCurve(relativeBonePath, typeof(Transform), "localPosition.y", new AnimationCurve(posAndRot.PosY.ToArray()));
Expand Down
1 change: 1 addition & 0 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.4.8",
"com.unity.ugui": "1.0.0",
"org.khronos.unitygltf": "https://github.com/KhronosGroup/UnityGLTF.git",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
Expand Down
47 changes: 47 additions & 0 deletions Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,31 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "10.8.1",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.searcher": {
"version": "4.3.2",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.0.1",
"depth": 1,
Expand All @@ -93,6 +118,16 @@
},
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "10.8.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.render-pipelines.core": "10.8.1",
"com.unity.searcher": "4.3.2"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.33",
"depth": 0,
Expand Down Expand Up @@ -134,6 +169,18 @@
"com.unity.modules.imgui": "1.0.0"
}
},
"org.khronos.unitygltf": {
"version": "https://github.com/KhronosGroup/UnityGLTF.git",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.shadergraph": "10.0.0",
"com.unity.mathematics": "1.0.0"
},
"hash": "dbd863412a2807fea00b4433d28ec3682eac6bda"
},
"com.unity.modules.ai": {
"version": "1.0.0",
"depth": 0,
Expand Down
18 changes: 18 additions & 0 deletions ProjectSettings/BurstAotSettings_StandaloneWindows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"DebugDataKind": 1,
"EnableArmv9SecurityFeatures": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"CpuTargetsX32": 6,
"CpuTargetsX64": 72,
"OptimizeFor": 0
}
}
16 changes: 16 additions & 0 deletions ProjectSettings/BurstAotSettings_WebGL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"DebugDataKind": 1,
"EnableArmv9SecurityFeatures": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"OptimizeFor": 0
}
}
6 changes: 6 additions & 0 deletions ProjectSettings/CommonBurstAotSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"MonoBehaviour": {
"Version": 4,
"DisabledWarnings": ""
}
}
Loading

0 comments on commit d0ca1fe

Please sign in to comment.