This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Improbable; | |
using UnityEngine; | |
using Improbable.Character; | |
using Improbable.Gdk.GameObjectRepresentation; | |
using Improbable.Gdk.TransformSynchronization; | |
using Improbable.Worker.CInterop; | |
public class CharacterMovementBehavior : MonoBehaviour { | |
[Require] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
namespace UnityLibrary | |
{ | |
[CustomEditor(typeof(SceneAsset))] | |
public class CustomThumbnail : Editor | |
{ | |
public override bool HasPreviewGUI() => true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DrawBounds(Bounds b, float delay=0) | |
{ | |
// bottom | |
var p1 = new Vector3(b.min.x, b.min.y, b.min.z); | |
var p2 = new Vector3(b.max.x, b.min.y, b.min.z); | |
var p3 = new Vector3(b.max.x, b.min.y, b.max.z); | |
var p4 = new Vector3(b.min.x, b.min.y, b.max.z); | |
Debug.DrawLine(p1, p2, Color.blue, delay); | |
Debug.DrawLine(p2, p3, Color.red, delay); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void SetGameObjectIcon(GameObject go, string texturePath) | |
{ | |
Texture2D texture = AssetDatabase.LoadAssetAtPath<Texture2D>(texturePath); | |
if (texture == null) | |
{ | |
Debug.LogError("Couldn't find an icon..."); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* Don't Be a Jerk: The Open Source Software License. | |
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
******************************************************************************* | |
* _I_ am the software author - JohannesMP on Github. | |
* _You_ are the user of this software. You might be a _we_, and that's OK! | |
* | |
* This is free, open source software. I will never charge you to use, | |
* license, or obtain this software. Doing so would make me a jerk. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using System.Collections.Generic; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEditor.IMGUI.Controls; | |
using UnityEngine.Rendering; | |
#endif | |
using UnityEngine; | |
public class BoxColliderWizard : MonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =============================== | |
// AUTHOR : John Leonard | |
// CREATE DATE : 25.04.2020 | |
// NOTE : Always include this | |
// Header when copying the file | |
// =============================== | |
// Licence: MIT (https://opensource.org/licenses/MIT) | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | |
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if ODIN_INSPECTOR | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Sirenix.OdinInspector.Editor; | |
using Sirenix.Utilities; | |
using Sirenix.Utilities.Editor; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sirenix.OdinInspector.Editor; | |
using Sirenix.Utilities; | |
using Sirenix.Utilities.Editor; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A container class which encapsulates the KeyValuePair so it shows up in the editor. | |
/// Also allows us to update key and value without much hassle. | |
/// </summary> | |
/// <typeparam name="TKey"></typeparam> | |
/// <typeparam name="TValue"></typeparam> | |
[Serializable] | |
public class KeyValuePairContainer<TKey, TValue> | |
{ | |
/// <summary> |
NewerOlder