Skip to content

Commit 846198c

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into UNI-22026-project-settings-turntable-scene
# Conflicts: # Assets/FbxExporters/Editor/ReviewLastSavedModel.cs # Assets/FbxExporters/RotateModel.cs
2 parents 481273e + 5f18134 commit 846198c

File tree

9 files changed

+437
-129
lines changed

9 files changed

+437
-129
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// ***********************************************************************
2+
// Copyright (c) 2017 Unity Technologies. All rights reserved.
3+
//
4+
// Licensed under the ##LICENSENAME##.
5+
// See LICENSE.md file in the project root for full license information.
6+
// ***********************************************************************
7+
8+
9+
using System.Collections;
10+
using System.Collections.Generic;
11+
using UnityEngine;
12+
using UnityEditor;
13+
14+
namespace FbxExporters.Review
15+
{
16+
[CustomEditor (typeof(RotateModel))]
17+
public class EditorRotate : UnityEditor.Editor
18+
{
19+
RotateModel model;
20+
21+
public void OnEnable ()
22+
{
23+
model = (RotateModel)target;
24+
EditorApplication.update += Update;
25+
}
26+
27+
public void OnDisable ()
28+
{
29+
EditorApplication.update -= Update;
30+
}
31+
32+
void Update ()
33+
{
34+
// don't do anything in play mode
35+
if (model == null || EditorApplication.isPlaying) {
36+
return;
37+
}
38+
model.Rotate ();
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)