This file contains hidden or 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 Random = UnityEngine.Random; | |
using Sirenix.OdinInspector; | |
[System.Serializable] | |
[InlineProperty(LabelWidth = 0)] | |
public class CustomValue | |
{ | |
[System.Serializable] | |
[HideLabel, LabelWidth(50)] | |
[InlineProperty(LabelWidth = 0)] |
This file contains hidden or 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 System.Collections.Generic; | |
using UnityEngine; | |
public class HomingMissile : MonoBehaviour | |
{ | |
[GetComponent] [SerializeField] private Rigidbody2D m_Rigidbody2D; | |
public Rigidbody2D Rigidbody2D { get => m_Rigidbody2D; } | |
public Transform Target; |
This file contains hidden or 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.Generic; | |
using System.IO; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
/// Thanks @JoshuaMcKenzie for idea http://answers.unity.com/answers/1213863/view.html | |
public class AssetsDistributor : UnityEditor.AssetModificationProcessor | |
{ | |
//only evaluate files imported into these paths |
This file contains hidden or 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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Custom/WaveExplo" { | |
Properties { | |
_MainTex ("", 2D) = "white" {} | |
_CenterX ("CenterX", Range(-1,2)) = 0.5 | |
_CenterY ("CenterY", Range(-1,2)) = 0.5 | |
_Radius ("Radius", Range(-1,1)) = 0.2 | |
_WaveSize ("Wave Size", float) = 0.2 | |
_Amplitude ("Amplitude", Range(-10,10)) = 0.05 |
This file contains hidden or 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 System.Collections.Generic; | |
using Nrjwolf.Tools.AttachAttributes; // https://github.com/Nrjwolf/unity-auto-attach-component-attributes | |
using TMPro; | |
using UnityEngine; | |
[RequireComponent(typeof(TextMeshProUGUI))] | |
public class TextMeshProTeletypeEffect : MonoBehaviour | |
{ | |
[GetComponent] [SerializeField] private TextMeshProUGUI m_TextMeshProUGUI; |
This file contains hidden or 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
{ | |
"Get/Set": { | |
"prefix": "Get/Set", | |
"body": [ | |
"[SerializeField]", | |
"private $TYPE m_$NAME;", | |
"public $TYPE $NAME", | |
"{", | |
" get => m_$NAME;", | |
" set", |
This file contains hidden or 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
{ | |
"FindObjectOfType attribute": { | |
"prefix": "findObjectOfTypeAttribute", | |
"body": [ | |
"[FindObjectOfType] [SerializeField] private $COMPONENT m_$COMPONENT;", | |
"public $COMPONENT $COMPONENT { get => m_$COMPONENT; }" | |
], | |
"description": "https://github.com/Nrjwolf/unity-auto-attach-component-attributes" | |
}, | |
"GetComponent ttribute": { |
This file contains hidden or 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; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
public class NetworkConnectionChecker : MonoBehaviour | |
{ | |
[Header("Settings")] | |
public bool RunOnStart = true; | |
public string DefaultChekingServer = "https://google.com"; |