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
// Place file in your main project, outside of an Editor folder | |
using UnityEngine; | |
namespace FMPUtils.Types | |
{ | |
[System.Serializable] | |
public class AnimationStateNameSelection | |
{ | |
public Animator animator; | |
public string animationName; |
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; | |
using System.Linq; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.SceneManagement; | |
namespace FMPUtils.Editor | |
{ | |
public class SceneReferenceHighlighterWindow : EditorWindow |
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 UnityEngine; | |
using UnityEditor; | |
// When editing multiple projects, the LossyScale proeprty will display only the value of the first/main | |
// selected transform, which does not apply to all other selected transforms. So be careful when changing the LossyScale, | |
// as the scale values from this first transform are taken as base. | |
[CanEditMultipleObjects] | |
[CustomEditor(typeof(Transform))] | |
public class TransformLossyScaleEditor : Editor | |
{ |
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; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEngine; | |
// Source and Credit: FREE Audio Preview Tool For Unity Tutorial (by Warped Imagination) 2022-12-05 | |
// https://www.youtube.com/watch?v=Gd8M1Ychis8 | |
public static class AudioPreviewer | |
{ |
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
// Place inside an "Editor" folder | |
#if PLATFORM_STANDALONE_WIN | |
using System; | |
using System.IO; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEngine; | |
public static class FbxBlenderOpeningProcessor | |
{ |
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; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
// TODO: check if we can select multiple | |
// https://answers.unity.com/questions/865321/custom-materialpropertydrawer-with-argument.html | |
// Pass one or more keywords in the constructor, I'm not sure how values will get separated though or if they will | |
/// <summary> | |
/// Usage: [ShowIfKeywordEnabled(_KEYWORD)] |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UObject = UnityEngine.Object; | |
namespace FMPUtils | |
{ | |
// Usage: UnityObjectInstance<Player>.Instance | |
public static class UnityObjectInstance<T> where T : UObject | |
{ |
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 UnityEngine; | |
namespace FMPUtils | |
{ | |
public class ObjectSpawner3DGrid : MonoBehaviour | |
{ | |
[SerializeField] GameObject spawnPrefab; | |
[SerializeField] Transform spawnParent; | |
[SerializeField] Vector3 startPosition; | |
[SerializeField] Vector3 xUnit = new Vector3(1f, 0f, 0f); |
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 UnityEngine; | |
namespace FMPUtils.Extensions | |
{ | |
public static class SpringMotion | |
{ | |
// Reference video: | |
// https://www.youtube.com/watch?v=bFOAipGJGA0 | |
// Instant "Game Feel" Tutorial - Secrets of Springs Explained (by Toyful Games) | |
// The channel LlamAcademy also made an adaption of the concept for Unity, |
NewerOlder