Skip to content

Commit

Permalink
Merge pull request #1262 from ousttrue/fix/unity_version
Browse files Browse the repository at this point in the history
Fix/unity version
  • Loading branch information
PoChang007 authored Sep 29, 2021
2 parents 3ebced6 + 38727a9 commit 6e3715b
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "UniGLTF.Samples.ScreenSpace",
"references": [
"GUID:8d76e605759c3f64a957d63ef96ada7c"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "VRM.Samples.AnimationBridgeSample",
"references": [
"GUID:05dd262a0c0a2f841b8252c8c3815582"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "VRM.Samples.FirstPersonSample",
"references": [
"GUID:da3e51d19d51a544fa14d43fee843098",
"GUID:b7aa47b240b57de44a4b2021c143c9bf",
"GUID:8d76e605759c3f64a957d63ef96ada7c",
"GUID:05dd262a0c0a2f841b8252c8c3815582"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "VRM.Samples.RuntimeExporterSample",
"references": [
"GUID:da3e51d19d51a544fa14d43fee843098",
"GUID:8d76e605759c3f64a957d63ef96ada7c",
"GUID:05dd262a0c0a2f841b8252c8c3815582"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

18 changes: 18 additions & 0 deletions Assets/VRM/Samples/SimpleViewer/VRM.Samples.SimpleViewer.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "VRM.Samples.SimpleViewer",
"references": [
"GUID:da3e51d19d51a544fa14d43fee843098",
"GUID:b7aa47b240b57de44a4b2021c143c9bf",
"GUID:8d76e605759c3f64a957d63ef96ada7c",
"GUID:05dd262a0c0a2f841b8252c8c3815582"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

11 changes: 8 additions & 3 deletions Assets/VRM10/Editor/EditorTool/VRM10BoneSelectorEditorTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
using UnityEditor.EditorTools;
using UniGLTF;

#if UNITY_2021_OR_NEWER
#else
using ToolManager = UnityEditor.EditorTools.EditorTools;
#endif

namespace UniVRM10
{
/// <summary>
Expand All @@ -27,15 +32,15 @@ public override GUIContent toolbarIcon
BoneSelector _impl;
void OnEnable()
{
EditorTools.activeToolChanged += ActiveToolDidChange;
ToolManager.activeToolChanged += ActiveToolDidChange;
if (SceneView.lastActiveSceneView?.camera)
{
}
}

void OnDisable()
{
EditorTools.activeToolChanged -= ActiveToolDidChange;
ToolManager.activeToolChanged -= ActiveToolDidChange;
if (_impl != null)
{
_impl.Dispose();
Expand All @@ -45,7 +50,7 @@ void OnDisable()

void ActiveToolDidChange()
{
if (EditorTools.IsActiveTool(this))
if (ToolManager.IsActiveTool(this))
{
}
else
Expand Down
11 changes: 8 additions & 3 deletions Assets/VRM10/Editor/EditorTool/VRM10ExpressionEditorTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
using UnityEditor.EditorTools;
using UnityEngine;

#if UNITY_2021_OR_NEWER
#else
using ToolManager = UnityEditor.EditorTools.EditorTools;
#endif

namespace UniVRM10
{
[EditorTool("vrm-1.0/Expression", typeof(UniVRM10.Vrm10Instance))]
Expand All @@ -24,17 +29,17 @@ public override GUIContent toolbarIcon

void OnEnable()
{
EditorTools.activeToolChanged += ActiveToolDidChange;
ToolManager.activeToolChanged += ActiveToolDidChange;
}

void OnDisable()
{
EditorTools.activeToolChanged -= ActiveToolDidChange;
ToolManager.activeToolChanged -= ActiveToolDidChange;
}

void ActiveToolDidChange()
{
if (!EditorTools.IsActiveTool(this))
if (!ToolManager.IsActiveTool(this))
{
return;
}
Expand Down
11 changes: 8 additions & 3 deletions Assets/VRM10/Editor/EditorTool/VRM10LookAtEditorTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
using UnityEditor;
using UnityEditor.EditorTools;

#if UNITY_2021_OR_NEWER
#else
using ToolManager = UnityEditor.EditorTools.EditorTools;
#endif


namespace UniVRM10
{
Expand All @@ -23,17 +28,17 @@ public override GUIContent toolbarIcon

void OnEnable()
{
EditorTools.activeToolChanged += ActiveToolDidChange;
ToolManager.activeToolChanged += ActiveToolDidChange;
}

void OnDisable()
{
EditorTools.activeToolChanged -= ActiveToolDidChange;
ToolManager.activeToolChanged -= ActiveToolDidChange;
}

void ActiveToolDidChange()
{
if (!EditorTools.IsActiveTool(this))
if (!ToolManager.IsActiveTool(this))
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "VRM10.Samples.VRM10FirstPersonSample",
"references": [
"GUID:da3e51d19d51a544fa14d43fee843098",
"GUID:b7aa47b240b57de44a4b2021c143c9bf",
"GUID:8d76e605759c3f64a957d63ef96ada7c",
"GUID:e47c917724578cc43b5506c17a27e9a0"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

18 changes: 18 additions & 0 deletions Assets/VRM10/Samples/VRM10Viewer/VRM10.Samples.VRM10Viewer.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "VRM10.Samples.VRM10Viewer",
"references": [
"GUID:b7aa47b240b57de44a4b2021c143c9bf",
"GUID:da3e51d19d51a544fa14d43fee843098",
"GUID:8d76e605759c3f64a957d63ef96ada7c",
"GUID:e47c917724578cc43b5506c17a27e9a0"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

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

0 comments on commit 6e3715b

Please sign in to comment.