Skip to content
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

Fix/unity version #1262

Merged
merged 2 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.