Skip to content

Commit 4c7b1da

Browse files
author
Rene Damm
committed
MERGE: develop => stable.
2 parents 235baf9 + 86ff0df commit 4c7b1da

File tree

207 files changed

+18098
-2861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+18098
-2861
lines changed

.yamato/config.metadata

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ platforms:
2121
flavor: b1.large
2222
runtime: StandaloneWindows64
2323
scripting-backend: Il2Cpp
24-
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP -w -u
24+
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP -w -u
2525
netinstall: choco install netfx-4.7.1-devpack -y --ignore-detected-reboot --ignore-package-codes --Source https://bfartifactory.bf.unity3d.com/artifactory/api/nuget/unity-choco-local
2626
- name: mac
2727
type: Unity::VM::osx
@@ -36,9 +36,9 @@ platforms:
3636
type: Unity::VM::osx
3737
image: package-ci/mac:stable
3838
flavor: m1.mac
39-
runtime: StandaloneOSX
40-
scripting-backend: Il2Cpp
41-
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP -w -u
39+
runtime: StandaloneOSX
40+
scripting-backend: Il2Cpp
41+
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP -w -u
4242
scripting_backends:
4343
- name: mono
4444
- name: il2cpp

.yamato/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ check_formatting:
22
name : Check formatting
33
agent:
44
type: Unity::VM::osx
5-
image: desktop/desktop-macos-10.14:latest
5+
image: package-ci/mac:latest
66
flavor: m1.mac
77
commands:
88
- hg clone -b stable http://hg-mirror-slo.hq.unity3d.com/unity-extra/unity-meta

.yamato/upm-ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build_ios_{{ editor.version }}:
4646
name: Build Tests on {{ editor.version }} on ios
4747
agent:
4848
type: Unity::VM::osx
49-
image: mobile/macos-10.13-testing:stable
49+
image: mobile/macos-10.15-testing:stable
5050
flavor: b1.large
5151
commands:
5252
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
@@ -66,7 +66,7 @@ run_ios_{{ editor.version }}:
6666
name: Run Tests on {{ editor.version }} on ios
6767
agent:
6868
type: Unity::mobile::iPhone
69-
image: mobile/macos-10.13-testing:stable
69+
image: mobile/macos-10.15-testing:stable
7070
flavor: b1.medium
7171
skip_checkout: true
7272
dependencies:
@@ -87,7 +87,7 @@ build_tvos_{{ editor.version }}:
8787
name: Build Tests on {{ editor.version }} on tvos
8888
agent:
8989
type: Unity::VM::osx
90-
image: mobile/macos-10.13-testing:stable
90+
image: mobile/macos-10.15-testing:stable
9191
flavor: b1.large
9292
commands:
9393
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
@@ -108,7 +108,7 @@ build_android_{{ editor.version }}_{{ backend.name }}:
108108
name: Build Tests on {{ editor.version }} on android {{ backend.name }}
109109
agent:
110110
type: Unity::VM
111-
image: mobile/android-execution-r19:stable
111+
image: mobile/android-execution-base:stable
112112
flavor: b1.xlarge
113113
commands:
114114
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
@@ -127,7 +127,7 @@ run_android_{{ editor.version }}_{{ backend.name }}:
127127
name: Run Tests on {{ editor.version }} on android {{ backend.name }}
128128
agent:
129129
type: Unity::mobile::shield
130-
image: mobile/android-execution-r19:stable
130+
image: mobile/android-execution-base:stable
131131
flavor: b1.medium
132132
# Skip repository cloning
133133
skip_checkout: true

Assets/QA/Tests/EditMode.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
using System;
2+
using System.Linq;
3+
using UnityEngine;
4+
using UnityEngine.InputSystem;
5+
6+
[ExecuteInEditMode]
7+
public class EditModeGhostCam : MonoBehaviour
8+
{
9+
[SerializeField, Range(0.1f, 10f)]
10+
float m_MoveSpeed;
11+
12+
[SerializeField, Range(1f, 10f)]
13+
float m_SpeedMultiplier;
14+
15+
[SerializeField, Range(0.01f, 1f)]
16+
float m_RotateSpeed;
17+
18+
[SerializeField]
19+
InputActionReference m_MoveActionReference;
20+
21+
[SerializeField]
22+
InputActionReference m_LookActionReference;
23+
24+
[SerializeField]
25+
InputActionReference m_ResetActionReference;
26+
27+
[SerializeField]
28+
InputActionReference m_SpeedActionReference;
29+
30+
InputAction m_MoveAction;
31+
InputAction m_LookAction;
32+
InputAction m_ResetAction;
33+
InputAction m_SpeedAction;
34+
void OnEnable()
35+
{
36+
EnableAction(ref m_MoveActionReference, ref m_MoveAction);
37+
EnableAction(ref m_LookActionReference, ref m_LookAction);
38+
EnableAction(ref m_ResetActionReference, ref m_ResetAction, ResetRequested);
39+
EnableAction(ref m_SpeedActionReference, ref m_SpeedAction);
40+
}
41+
42+
void OnDisable()
43+
{
44+
DisableAction(ref m_MoveAction);
45+
DisableAction(ref m_LookAction);
46+
DisableAction(ref m_ResetAction, ResetRequested);
47+
DisableAction(ref m_SpeedAction);
48+
}
49+
50+
void EnableAction(ref InputActionReference actionReference, ref InputAction action, Action<InputAction.CallbackContext> performedCallback = null)
51+
{
52+
DisableAction(ref action);
53+
54+
if (actionReference != null)
55+
action = actionReference.action;
56+
57+
if (action != null)
58+
{
59+
if (performedCallback != null)
60+
action.performed += performedCallback;
61+
62+
action.Enable();
63+
}
64+
}
65+
66+
void DisableAction(ref InputAction action, Action<InputAction.CallbackContext> performedCallback = null)
67+
{
68+
if (action != null)
69+
{
70+
action.Disable();
71+
72+
if (performedCallback != null)
73+
action.performed -= performedCallback;
74+
}
75+
76+
action = null;
77+
}
78+
79+
void Update()
80+
{
81+
if (m_LookAction != null)
82+
{
83+
var look = m_LookAction.ReadValue<Vector2>();
84+
look *= m_RotateSpeed;
85+
86+
var myTransform = transform;
87+
myTransform.localEulerAngles = myTransform.localEulerAngles + new Vector3(-look.y, look.x, 0f);
88+
}
89+
90+
if (m_MoveAction != null)
91+
{
92+
var move = m_MoveAction.ReadValue<Vector2>();
93+
move *= Time.deltaTime * m_MoveSpeed;
94+
if ((m_SpeedAction?.ReadValue<float>() ?? 0f) > 0.5f)
95+
move *= m_SpeedMultiplier;
96+
transform.Translate(move.x, 0f, move.y);
97+
}
98+
}
99+
100+
void ResetRequested(InputAction.CallbackContext ctx)
101+
{
102+
var myTransform = transform;
103+
myTransform.localPosition = Vector3.zero;
104+
myTransform.localRotation = Quaternion.identity;
105+
}
106+
107+
void OnValidate()
108+
{
109+
if (!isActiveAndEnabled)
110+
return;
111+
112+
DisableAction(ref m_MoveAction);
113+
DisableAction(ref m_LookAction);
114+
DisableAction(ref m_ResetAction, ResetRequested);
115+
DisableAction(ref m_SpeedAction);
116+
117+
EnableAction(ref m_MoveActionReference, ref m_MoveAction);
118+
EnableAction(ref m_LookActionReference, ref m_LookAction);
119+
EnableAction(ref m_ResetActionReference, ref m_ResetAction, ResetRequested);
120+
EnableAction(ref m_SpeedActionReference, ref m_SpeedAction);
121+
}
122+
}

Assets/TestScript.cs.meta renamed to Assets/QA/Tests/EditMode/EditModeGhostCam.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)