studycase2
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Boxophobic.Utils.Scripts",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 825ad574da7360d4e8aea558f272972e
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/Notebox.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/Notebox.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72868530be972004fa1a5ddb9445c243
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/BOXOPHOBIC/Utils/Scripts/Notebox/Notebox.cs
Normal file
17
Assets/BOXOPHOBIC/Utils/Scripts/Notebox/Notebox.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.Utility
|
||||
{
|
||||
public class Notebox : MonoBehaviour
|
||||
{
|
||||
#if (UNITY_EDITOR)
|
||||
[HideInInspector]
|
||||
public int noteSize = 16;
|
||||
[HideInInspector]
|
||||
public Color noteColor = Color.white;
|
||||
[TextArea(3, 5)]
|
||||
[HideInInspector]
|
||||
public string noteText = "";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
11
Assets/BOXOPHOBIC/Utils/Scripts/Notebox/Notebox.cs.meta
Normal file
11
Assets/BOXOPHOBIC/Utils/Scripts/Notebox/Notebox.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 356898a958424c146b57e08ea00d6922
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 7a0d9f99b02cc8941a235c921fbe6266, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/Runtime.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/Runtime.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bf9664c1157c8f478c5659d416e0cc1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
41
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/CamController.cs
Normal file
41
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/CamController.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.Utility
|
||||
{
|
||||
public class CamController : MonoBehaviour
|
||||
{
|
||||
public float movementSpeed = 5f;
|
||||
public float accelerationMultiplier = 2f;
|
||||
public float sensitivity = 2f;
|
||||
|
||||
private float yaw = 0f;
|
||||
private float pitch = 0f;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Store the initial rotation of the camera
|
||||
yaw = transform.eulerAngles.y;
|
||||
pitch = transform.eulerAngles.x;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
float currentSpeed = movementSpeed;
|
||||
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
{
|
||||
currentSpeed *= accelerationMultiplier;
|
||||
}
|
||||
|
||||
float horizontalMovement = Input.GetAxis("Horizontal") * currentSpeed * Time.deltaTime;
|
||||
float verticalMovement = Input.GetAxis("Vertical") * currentSpeed * Time.deltaTime;
|
||||
|
||||
transform.Translate(horizontalMovement, 0, verticalMovement);
|
||||
|
||||
yaw += sensitivity * Input.GetAxis("Mouse X");
|
||||
pitch -= sensitivity * Input.GetAxis("Mouse Y");
|
||||
pitch = Mathf.Clamp(pitch, -90f, 90f);
|
||||
|
||||
transform.rotation = Quaternion.Euler(pitch, yaw, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 195d4c9b85f7ea146aac46a389a6f08f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
58
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/FPSController.cs
Normal file
58
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/FPSController.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
//Stripped down version from https://sharpcoderblog.com/blog/unity-3d-fps-controller
|
||||
|
||||
#if ENABLE_LEGACY_INPUT_MANAGER
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.Utility
|
||||
{
|
||||
[RequireComponent(typeof(UnityEngine.CharacterController))]
|
||||
public class FPSController : MonoBehaviour
|
||||
{
|
||||
public float walkingSpeed = 2.0f;
|
||||
public float lookSpeed = 2.0f;
|
||||
public float lookXLimit = 45.0f;
|
||||
|
||||
[Space(10)]
|
||||
public GameObject playerCamera;
|
||||
|
||||
UnityEngine.CharacterController characterController;
|
||||
float rotationX = 0;
|
||||
|
||||
void Start()
|
||||
{
|
||||
characterController = GetComponent<UnityEngine.CharacterController>();
|
||||
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var runSpeed = 1.0f;
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
runSpeed = 3.0f;
|
||||
}
|
||||
|
||||
Vector3 forward = transform.TransformDirection(Vector3.forward);
|
||||
Vector3 right = transform.TransformDirection(Vector3.right);
|
||||
Vector3 moveDirection = (forward * walkingSpeed * runSpeed * Input.GetAxis("Vertical")) + (right * walkingSpeed * runSpeed * Input.GetAxis("Horizontal"));
|
||||
|
||||
if (characterController.isGrounded == false)
|
||||
{
|
||||
moveDirection += Physics.gravity;
|
||||
}
|
||||
|
||||
characterController.Move(moveDirection * Time.deltaTime);
|
||||
|
||||
rotationX += -Input.GetAxis("Mouse Y") * lookSpeed;
|
||||
rotationX = Mathf.Clamp(rotationX, -lookXLimit, lookXLimit);
|
||||
playerCamera.transform.localRotation = Quaternion.Euler(rotationX, 0, 0);
|
||||
transform.rotation *= Quaternion.Euler(0, Input.GetAxis("Mouse X") * lookSpeed, 0);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14dd81840028bd24ebee23af01e480fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/NPCController.cs
Normal file
34
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/NPCController.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.Utility
|
||||
{
|
||||
public class NPCController : MonoBehaviour
|
||||
{
|
||||
private float timeToChangeDirection;
|
||||
Vector3 direction;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
ChangeDirection();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
timeToChangeDirection -= Time.deltaTime;
|
||||
|
||||
if (timeToChangeDirection <= 0)
|
||||
{
|
||||
ChangeDirection();
|
||||
}
|
||||
|
||||
transform.Translate(direction, Space.World);
|
||||
}
|
||||
|
||||
private void ChangeDirection()
|
||||
{
|
||||
var speed = Random.Range(0.005f, 0.01f);
|
||||
direction = new Vector3(Random.Range(-1f, 1f) * speed, 0, Random.Range(-1f, 1f) * speed);
|
||||
timeToChangeDirection = Random.Range(0.5f, 2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb3be98ee36cd8b4f8710bbb0a16160b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
120
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/SceneSwitch.cs
Normal file
120
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/SceneSwitch.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
using Boxophobic.StyledGUI;
|
||||
using UnityEngine.Rendering;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor.SceneManagement;
|
||||
#endif
|
||||
|
||||
namespace Boxophobic.Utility
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public class SceneSwitch : StyledMonoBehaviour
|
||||
{
|
||||
[StyledBanner("Switch")]
|
||||
public bool styledBanner;
|
||||
|
||||
public GameObject setupStandard;
|
||||
public GameObject setupUniversal;
|
||||
public GameObject setupHD;
|
||||
[HideInInspector]
|
||||
public GameObject objectStandard;
|
||||
[HideInInspector]
|
||||
public GameObject objectUniversal;
|
||||
[HideInInspector]
|
||||
public GameObject objectHD;
|
||||
|
||||
[Space(10)]
|
||||
public bool setRenderSettings;
|
||||
|
||||
[Space(10)]
|
||||
public Material skyboxMaterial;
|
||||
[Range(0, 8)]
|
||||
public float skyboxAmbient = 1;
|
||||
[Range(0, 1)]
|
||||
public float skyboxReflection = 1;
|
||||
|
||||
[StyledSpace(5)]
|
||||
public bool styledSpace;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int pipeline = 0;
|
||||
|
||||
if (GraphicsSettings.defaultRenderPipeline != null)
|
||||
{
|
||||
if (GraphicsSettings.defaultRenderPipeline.GetType().ToString().Contains("Universal"))
|
||||
{
|
||||
pipeline = 1;
|
||||
}
|
||||
|
||||
if (GraphicsSettings.defaultRenderPipeline.GetType().ToString().Contains("HD"))
|
||||
{
|
||||
pipeline = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (QualitySettings.renderPipeline != null)
|
||||
{
|
||||
if (QualitySettings.renderPipeline.GetType().ToString().Contains("Universal"))
|
||||
{
|
||||
pipeline = 1;
|
||||
}
|
||||
|
||||
if (QualitySettings.renderPipeline.GetType().ToString().Contains("HD"))
|
||||
{
|
||||
pipeline = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (pipeline == 0)
|
||||
{
|
||||
if (setupStandard != null && objectStandard == null)
|
||||
{
|
||||
objectStandard = Instantiate(setupStandard, gameObject.transform);
|
||||
objectStandard.name = objectStandard.name.Replace("(Clone)", "");
|
||||
}
|
||||
}
|
||||
|
||||
if (pipeline == 1)
|
||||
{
|
||||
if (setupUniversal != null && objectUniversal == null)
|
||||
{
|
||||
objectUniversal = Instantiate(setupUniversal, gameObject.transform);
|
||||
objectUniversal.name = objectUniversal.name.Replace("(Clone)", "");
|
||||
}
|
||||
}
|
||||
|
||||
if (pipeline == 2)
|
||||
{
|
||||
if (setupHD != null && objectHD == null)
|
||||
{
|
||||
objectHD = Instantiate(setupHD, gameObject.transform);
|
||||
objectHD.name = objectHD.name.Replace("(Clone)", "");
|
||||
}
|
||||
}
|
||||
|
||||
if (setRenderSettings)
|
||||
{
|
||||
RenderSettings.skybox = skyboxMaterial;
|
||||
RenderSettings.ambientIntensity = skyboxAmbient;
|
||||
RenderSettings.reflectionIntensity = skyboxReflection;
|
||||
|
||||
DynamicGI.UpdateEnvironment();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
14
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/SceneSwitch.cs.meta
Normal file
14
Assets/BOXOPHOBIC/Utils/Scripts/Runtime/SceneSwitch.cs.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f8925abba486f64284bccfcd3bd4bb6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- turbulenceTexture: {instanceID: 0}
|
||||
- arrowMesh: {fileID: 4300000, guid: f4cbcdade646b3b4098dfd993b9a6ec9, type: 3}
|
||||
- arrowMaterial: {fileID: 2100000, guid: a5093d3a1e3c2b44c9af26e965a12e62, type: 2}
|
||||
executionOrder: -123
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/SettingsUtils.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/SettingsUtils.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24fdcedadb262f1469dc007ac6990ce4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
using Boxophobic.StyledGUI;
|
||||
|
||||
namespace Boxophobic.Utility
|
||||
{
|
||||
[CreateAssetMenu(fileName = "Data", menuName = "BOXOPHOBIC/Settings Data")]
|
||||
public class SettingsData : StyledScriptableObject
|
||||
{
|
||||
[StyledBanner(0.65f, 0.65f, 0.65f, "Settings Data")]
|
||||
public bool styledBanner;
|
||||
|
||||
[Space]
|
||||
public string data = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93308045fbb3c5e42ba5ccb66d848632
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 0f9def0f7e05709488f1ad256de55d9f, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/StyledGizmos.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/StyledGizmos.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df988576e59f52446b7f2cf7dba1a3d4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
113
Assets/BOXOPHOBIC/Utils/Scripts/StyledGizmos/StyledLabelGizmo.cs
Normal file
113
Assets/BOXOPHOBIC/Utils/Scripts/StyledGizmos/StyledLabelGizmo.cs
Normal file
@@ -0,0 +1,113 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledLabelGizmo : StyledMonoBehaviour
|
||||
{
|
||||
public Transform basePosition;
|
||||
public Transform labelPosition;
|
||||
|
||||
[Space(10)]
|
||||
public Object pingObject;
|
||||
|
||||
public enum LabelAnchor
|
||||
{
|
||||
Center = 10,
|
||||
Left = 20,
|
||||
Right = 30,
|
||||
}
|
||||
|
||||
[Space(10)]
|
||||
public LabelAnchor labelAnchor = LabelAnchor.Center;
|
||||
|
||||
[TextArea]
|
||||
public string labelText;
|
||||
|
||||
bool pingable;
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
var styleLabel = new GUIStyle(EditorStyles.whiteLabel)
|
||||
{
|
||||
richText = true,
|
||||
alignment = UnityEngine.TextAnchor.MiddleLeft,
|
||||
fontSize = 9,
|
||||
};
|
||||
|
||||
if (basePosition == null)
|
||||
{
|
||||
basePosition = transform;
|
||||
}
|
||||
|
||||
if (labelPosition == null)
|
||||
{
|
||||
labelPosition = transform;
|
||||
}
|
||||
|
||||
var label = gameObject.name;
|
||||
|
||||
if (labelText != null && labelText.Length != 0)
|
||||
{
|
||||
label = labelText;
|
||||
}
|
||||
|
||||
var size = styleLabel.CalcSize(new GUIContent(label));
|
||||
var offset = 0f;
|
||||
|
||||
if (labelAnchor == LabelAnchor.Right)
|
||||
{
|
||||
offset = size.x + 6;
|
||||
}
|
||||
else if (labelAnchor == LabelAnchor.Center)
|
||||
{
|
||||
offset = (size.x + 6) / 2;
|
||||
}
|
||||
|
||||
Handles.color = Color.black;
|
||||
GUI.color = Color.white;
|
||||
|
||||
Handles.DrawLine(basePosition.position, labelPosition.position);
|
||||
|
||||
Handles.BeginGUI();
|
||||
|
||||
var basePos2D = HandleUtility.WorldToGUIPoint(basePosition.position);
|
||||
var labelPos2D = HandleUtility.WorldToGUIPoint(labelPosition.position);
|
||||
|
||||
Handles.DrawSolidRectangleWithOutline(new Rect(labelPos2D.x - offset, labelPos2D.y - 24, size.x + 10, size.y + 10), Color.black, new Color(0, 0, 0, 0));
|
||||
|
||||
if (pingObject != null)
|
||||
{
|
||||
Event e = Event.current;
|
||||
var mousePos = e.mousePosition;
|
||||
|
||||
if (mousePos.x > labelPos2D.x - offset && mousePos.x < labelPos2D.x - offset + size.x + 8 && mousePos.y > labelPos2D.y - 24 && mousePos.y < labelPos2D.y - 24 + size.y + 8)
|
||||
{
|
||||
GUI.color = new Color(0.9f, 0.8f, 0.3f, 1f);
|
||||
//GUI.color = new Color(0.0f, 1f, 0.6f, 1f);
|
||||
|
||||
if (pingable && e.modifiers != EventModifiers.Alt)
|
||||
{
|
||||
EditorGUIUtility.PingObject(pingObject);
|
||||
pingable = false;
|
||||
}
|
||||
|
||||
//if (e.button == 0 && e.isMouse && e.modifiers != EventModifiers.Alt)
|
||||
//{
|
||||
// EditorGUIUtility.PingObject(pingObject);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
pingable = true;
|
||||
}
|
||||
}
|
||||
|
||||
GUI.Label(new Rect(labelPos2D.x + 4 - offset, labelPos2D.y - 20, size.x, size.y), label, styleLabel);
|
||||
|
||||
Handles.EndGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3a24ffac8f074c4f8765c1844bb5e90
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/StyledInspector.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/StyledInspector.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 520db4c4721a1084fa527e1c673ec7ab
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledBanner : PropertyAttribute
|
||||
{
|
||||
public float colorR;
|
||||
public float colorG;
|
||||
public float colorB;
|
||||
public string title;
|
||||
public string helpURL;
|
||||
|
||||
public StyledBanner(string title)
|
||||
{
|
||||
this.colorR = -1;
|
||||
this.title = title;
|
||||
this.helpURL = "";
|
||||
}
|
||||
|
||||
public StyledBanner(float colorR, float colorG, float colorB, string title)
|
||||
{
|
||||
this.colorR = colorR;
|
||||
this.colorG = colorG;
|
||||
this.colorB = colorB;
|
||||
this.title = title;
|
||||
this.helpURL = "";
|
||||
}
|
||||
|
||||
// Legacy
|
||||
public StyledBanner(string title, string helpURL)
|
||||
{
|
||||
this.colorR = -1;
|
||||
this.title = title;
|
||||
this.helpURL = helpURL;
|
||||
}
|
||||
|
||||
public StyledBanner(float colorR, float colorG, float colorB, string title, string helpURL)
|
||||
{
|
||||
this.colorR = colorR;
|
||||
this.colorG = colorG;
|
||||
this.colorB = colorB;
|
||||
this.title = title;
|
||||
this.helpURL = helpURL;
|
||||
}
|
||||
|
||||
public StyledBanner(string title, string subtitle, string helpURL)
|
||||
{
|
||||
this.colorR = -1;
|
||||
this.title = title;
|
||||
this.helpURL = helpURL;
|
||||
}
|
||||
|
||||
public StyledBanner(float colorR, float colorG, float colorB, string title, string subtitle, string helpURL)
|
||||
{
|
||||
this.colorR = colorR;
|
||||
this.colorG = colorG;
|
||||
this.colorB = colorB;
|
||||
this.title = title;
|
||||
this.helpURL = helpURL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fb089d68a8e4634390e299256c8eec7
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledButton : PropertyAttribute
|
||||
{
|
||||
public string text = "";
|
||||
public float top = 0;
|
||||
public float down = 0;
|
||||
|
||||
public StyledButton(string text)
|
||||
{
|
||||
this.text = text;
|
||||
this.top = 0;
|
||||
this.down = 0;
|
||||
}
|
||||
|
||||
public StyledButton(string text, float top, float down)
|
||||
{
|
||||
this.text = text;
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c167590d9d480e438111f555c3a9d09
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,45 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledCategory : PropertyAttribute
|
||||
{
|
||||
public string category;
|
||||
public float top;
|
||||
public float down;
|
||||
public bool colapsable;
|
||||
|
||||
public StyledCategory(string category)
|
||||
{
|
||||
this.category = category;
|
||||
this.top = 10;
|
||||
this.down = 10;
|
||||
this.colapsable = false;
|
||||
}
|
||||
|
||||
public StyledCategory(string category, bool colapsable)
|
||||
{
|
||||
this.category = category;
|
||||
this.top = 10;
|
||||
this.down = 10;
|
||||
this.colapsable = colapsable;
|
||||
}
|
||||
|
||||
public StyledCategory(string category, float top, float down)
|
||||
{
|
||||
this.category = category;
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
this.colapsable = false;
|
||||
}
|
||||
|
||||
public StyledCategory(string category, int top, int down, bool colapsable)
|
||||
{
|
||||
this.category = category;
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
this.colapsable = colapsable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6dfd994aa3f6b3944a0bd6effc2b3102
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledDisplay : PropertyAttribute
|
||||
{
|
||||
public string displayName = "";
|
||||
|
||||
public StyledDisplay(string displayName)
|
||||
{
|
||||
this.displayName = displayName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8810eaa25fcae3f488c321efd7c48acf
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledEnum : PropertyAttribute
|
||||
{
|
||||
public string display = "";
|
||||
public string file = "";
|
||||
public string options = "";
|
||||
|
||||
public int top = 0;
|
||||
public int down = 0;
|
||||
|
||||
public StyledEnum(string file, string options, int top, int down)
|
||||
{
|
||||
this.file = file;
|
||||
this.options = options;
|
||||
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
|
||||
public StyledEnum(string display, string file, string options, int top, int down)
|
||||
{
|
||||
this.display = display;
|
||||
this.file = file;
|
||||
this.options = options;
|
||||
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c65df615eedc39d41bcf5191b9429056
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledIndent : PropertyAttribute
|
||||
{
|
||||
public int indent;
|
||||
|
||||
public StyledIndent(int indent)
|
||||
{
|
||||
this.indent = indent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd0e43229939f8b45bd79345e699dfcd
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledInteractive : PropertyAttribute
|
||||
{
|
||||
public StyledInteractive()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 388415cfa9bb69041a8281bc567acec5
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledLayers : PropertyAttribute
|
||||
{
|
||||
public string display = "";
|
||||
public StyledLayers()
|
||||
{
|
||||
}
|
||||
|
||||
public StyledLayers(string display)
|
||||
{
|
||||
this.display = display;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 846c011559e38824090c713c729cfec1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledMask : PropertyAttribute
|
||||
{
|
||||
public string display = "";
|
||||
public string file = "";
|
||||
public string options = "";
|
||||
|
||||
public int top = 0;
|
||||
public int down = 0;
|
||||
|
||||
public StyledMask(string file, string options, int top, int down)
|
||||
{
|
||||
this.file = file;
|
||||
this.options = options;
|
||||
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
|
||||
public StyledMask(string display, string file, string options, int top, int down)
|
||||
{
|
||||
this.display = display;
|
||||
this.file = file;
|
||||
this.options = options;
|
||||
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4362c0144e8a5b45be782723d2c956f
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledMessage : PropertyAttribute
|
||||
{
|
||||
public string type;
|
||||
public string message;
|
||||
|
||||
public float top;
|
||||
public float down;
|
||||
|
||||
public StyledMessage(string type, string message)
|
||||
{
|
||||
this.type = type;
|
||||
this.message = message;
|
||||
this.top = 0;
|
||||
this.down = 0;
|
||||
}
|
||||
|
||||
public StyledMessage(string type, string message, float top, float down)
|
||||
{
|
||||
this.type = type;
|
||||
this.message = message;
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab1d3117b9da8d7429e5ac70bd016772
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledRangeOptions : PropertyAttribute
|
||||
{
|
||||
public string display;
|
||||
public float min;
|
||||
public float max;
|
||||
public string[] options;
|
||||
|
||||
public StyledRangeOptions(string display, float min, float max, string[] options)
|
||||
{
|
||||
this.display = display;
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
|
||||
this.options = options;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 896f8a6be3053ff4a8f322a960986af1
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledSpace : PropertyAttribute
|
||||
{
|
||||
public int space;
|
||||
|
||||
public StyledSpace(int space)
|
||||
{
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e11186e2ccd8bf44d9d8699902268c99
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
// Cristian Pop - https://boxophobic.com/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledText : PropertyAttribute
|
||||
{
|
||||
public string text = "";
|
||||
public TextAnchor alignment = TextAnchor.MiddleCenter;
|
||||
public float top = 0;
|
||||
public float down = 0;
|
||||
|
||||
public StyledText()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public StyledText(TextAnchor alignment)
|
||||
{
|
||||
this.alignment = alignment;
|
||||
}
|
||||
|
||||
public StyledText(TextAnchor alignment, float top, float down)
|
||||
{
|
||||
this.alignment = alignment;
|
||||
this.top = top;
|
||||
this.down = down;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df9ee7b5ab129dd4991f424a8d93430b
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledTexturePreview : PropertyAttribute
|
||||
{
|
||||
public string displayName = "";
|
||||
|
||||
public StyledTexturePreview()
|
||||
{
|
||||
this.displayName = "";
|
||||
}
|
||||
|
||||
public StyledTexturePreview(string displayName)
|
||||
{
|
||||
this.displayName = displayName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b33fc29a1077eff40880c4d54b57136c
|
||||
timeCreated: 1544997099
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/StyledMono.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/StyledMono.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de1d44c7b6d398845b17db2c7a53d701
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledMonoBehaviour : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0003a5bea05764747b05fa096a075848
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Boxophobic.StyledGUI
|
||||
{
|
||||
public class StyledScriptableObject : ScriptableObject
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 528a63c4c58b58a4ca3927eec830c596
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/BOXOPHOBIC/Utils/Scripts/Utility.meta
Normal file
8
Assets/BOXOPHOBIC/Utils/Scripts/Utility.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b72a6178c5044340ba5c695e0910c6e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1301
Assets/BOXOPHOBIC/Utils/Scripts/Utility/Utility.cs
Normal file
1301
Assets/BOXOPHOBIC/Utils/Scripts/Utility/Utility.cs
Normal file
File diff suppressed because it is too large
Load Diff
11
Assets/BOXOPHOBIC/Utils/Scripts/Utility/Utility.cs.meta
Normal file
11
Assets/BOXOPHOBIC/Utils/Scripts/Utility/Utility.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cd9cd113f44b044686ee05820fc753e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user