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; | |
using System.Linq; | |
namespace Invertex.Unity.Editor.Importing | |
{ | |
/// <summary> | |
/// This script will automatically generate an AvatarMask that will enable a Humanoid animation to animate all parts of your asset. | |
/// It will assign it to every clip in a new asset or every existing clip on an asset. | |
/// USAGE: Place in an "Editor" folder somewhere in your assets. |
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; | |
//Place on Camera you want to stop rendering UI while out of Play mode. | |
//UI Canvas needs to have its "Render Mode" be ing either "World Space" or "Screen Space - Camera" for this to work. | |
[ExecuteAlways, ExecuteInEditMode, RequireComponent(typeof(Camera))] | |
public class GameWindowHideUIUntilPlay : MonoBehaviour | |
{ | |
void OnEnable() | |
{ | |
ToggleUIDisplay(Application.isPlaying); |
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.Collections; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
namespace Invertex.Unity.Audio | |
{ | |
/// <summary> | |
/// Component that allows playback of an audio file from a server or locally that begins playing before the file is completely downloaded. | |
/// </summary> | |
public class StreamingAudioPlayer : 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
using UnityEngine; | |
namespace Invertex.Unity2D.Physics | |
{ | |
public static class Physics2DExtensions | |
{ | |
//Example Usage: rigidbody.ModifyUniquePhysicsMaterial2D(0.5f, 0.2f); | |
/// <summary> | |
/// Sets the given values on the PhysicsMaterial2D of the Rigidbody. If a material unique to this object doesn't exist, a new one will be created just for it. |
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
// Version of Unity Sprites/Default shader that does ZWrite | |
Shader "Invertex/Sprites/Default-ZWrite" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
[HideInInspector] _RendererColor ("RendererColor", Color) = (1,1,1,1) | |
[HideInInspector] _Flip ("Flip", Vector) = (1,1,1,1) |
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 UnityEngine.InputSystem; | |
//!!>> This script should NOT be placed in an "Editor" folder. Ideally placed in a "Plugins" folder. | |
namespace Invertex.UnityInputExtensions.Interactions | |
{ | |
//https://gist.github.com/Invertex | |
/// <summary> | |
/// Custom Hold interaction for New Input System. | |
/// With this, the .performed callback will be called everytime the Input System updates. |
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 UnityEditor; | |
using UnityEngine; | |
#if ENABLE_INPUT_SYSTEM | |
using UnityEngine.InputSystem; | |
#endif | |
//Simple Editor-side New Input System capture | |
namespace Invertex.UnityEditor.InputTools | |
{ | |
[InitializeOnLoad] |