清理项目目录并进行一次打包验证
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e40aeae89a478845b0d5a5d879a0699
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,35 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(DynamicJoystick))]
|
||||
public class DynamicJoystickEditor : JoystickEditor
|
||||
{
|
||||
private SerializedProperty moveThreshold;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
moveThreshold = serializedObject.FindProperty("moveThreshold");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
if (background != null)
|
||||
{
|
||||
RectTransform backgroundRect = (RectTransform)background.objectReferenceValue;
|
||||
backgroundRect.anchorMax = Vector2.zero;
|
||||
backgroundRect.anchorMin = Vector2.zero;
|
||||
backgroundRect.pivot = center;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void DrawValues()
|
||||
{
|
||||
base.DrawValues();
|
||||
EditorGUILayout.PropertyField(moveThreshold, new GUIContent("Move Threshold", "The distance away from the center input has to be before the joystick begins to move."));
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5e9a9da0786d1140aa0a03c549cfcd4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(FloatingJoystick))]
|
||||
public class FloatingJoystickEditor : JoystickEditor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
if (background != null)
|
||||
{
|
||||
RectTransform backgroundRect = (RectTransform)background.objectReferenceValue;
|
||||
backgroundRect.anchorMax = Vector2.zero;
|
||||
backgroundRect.anchorMin = Vector2.zero;
|
||||
backgroundRect.pivot = center;
|
||||
}
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4eeb7024a2680041ad9126751afc3a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,64 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(Joystick), true)]
|
||||
public class JoystickEditor : Editor
|
||||
{
|
||||
private SerializedProperty handleRange;
|
||||
private SerializedProperty deadZone;
|
||||
private SerializedProperty axisOptions;
|
||||
private SerializedProperty snapX;
|
||||
private SerializedProperty snapY;
|
||||
protected SerializedProperty background;
|
||||
private SerializedProperty handle;
|
||||
|
||||
protected Vector2 center = new Vector2(0.5f, 0.5f);
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
handleRange = serializedObject.FindProperty("handleRange");
|
||||
deadZone = serializedObject.FindProperty("deadZone");
|
||||
axisOptions = serializedObject.FindProperty("axisOptions");
|
||||
snapX = serializedObject.FindProperty("snapX");
|
||||
snapY = serializedObject.FindProperty("snapY");
|
||||
background = serializedObject.FindProperty("background");
|
||||
handle = serializedObject.FindProperty("handle");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
DrawValues();
|
||||
EditorGUILayout.Space();
|
||||
DrawComponents();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
if (handle != null)
|
||||
{
|
||||
RectTransform handleRect = (RectTransform)handle.objectReferenceValue;
|
||||
handleRect.anchorMax = center;
|
||||
handleRect.anchorMin = center;
|
||||
handleRect.pivot = center;
|
||||
handleRect.anchoredPosition = Vector2.zero;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void DrawValues()
|
||||
{
|
||||
EditorGUILayout.PropertyField(handleRange, new GUIContent("Handle Range", "The distance the visual handle can move from the center of the joystick."));
|
||||
EditorGUILayout.PropertyField(deadZone, new GUIContent("Dead Zone", "The distance away from the center input has to be before registering."));
|
||||
EditorGUILayout.PropertyField(axisOptions, new GUIContent("Axis Options", "Which axes the joystick uses."));
|
||||
EditorGUILayout.PropertyField(snapX, new GUIContent("Snap X", "Snap the horizontal input to a whole value."));
|
||||
EditorGUILayout.PropertyField(snapY, new GUIContent("Snap Y", "Snap the vertical input to a whole value."));
|
||||
}
|
||||
|
||||
protected virtual void DrawComponents()
|
||||
{
|
||||
EditorGUILayout.ObjectField(background, new GUIContent("Background", "The background's RectTransform component."));
|
||||
EditorGUILayout.ObjectField(handle, new GUIContent("Handle", "The handle's RectTransform component."));
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 179099b45ef8aff4d9827b6a1edbc5c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,37 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(VariableJoystick))]
|
||||
public class VariableJoystickEditor : JoystickEditor
|
||||
{
|
||||
private SerializedProperty moveThreshold;
|
||||
private SerializedProperty joystickType;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
moveThreshold = serializedObject.FindProperty("moveThreshold");
|
||||
joystickType = serializedObject.FindProperty("joystickType");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
if (background != null)
|
||||
{
|
||||
RectTransform backgroundRect = (RectTransform)background.objectReferenceValue;
|
||||
backgroundRect.pivot = center;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void DrawValues()
|
||||
{
|
||||
base.DrawValues();
|
||||
EditorGUILayout.PropertyField(moveThreshold, new GUIContent("Move Threshold", "The distance away from the center input has to be before the joystick begins to move."));
|
||||
EditorGUILayout.PropertyField(joystickType, new GUIContent("Joystick Type", "The type of joystick the variable joystick is current using."));
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5730e2f409c715545902697544b5abe5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user