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 System.Collections.Generic; | |
using UnityEngine; | |
public class Movement_Camera : MonoBehaviour | |
{ | |
private enum CameraOptionsPos { None, Follow } | |
private enum CameraOptionsRot { None, Follow } | |
[Header("Options")] |
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 System.Collections.Generic; | |
using UnityEngine; | |
[RequireComponent(typeof(CharacterController))] | |
public class Movement_CC_TopDown : MonoBehaviour | |
{ | |
//Movement | |
[Header("Settings Camera")] | |
[SerializeField] private Camera _Camera; |
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 Unity.Collections; | |
using Unity.Jobs; | |
using UnityEngine; | |
public class RaycastCommandRaycaster: IDisposable | |
{ | |
NativeArray<RaycastCommand> commands; | |
NativeArray<RaycastHit> results; |
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 UnityEngine; | |
using UnityEditor; | |
[InitializeOnLoad] | |
public static class NewObjectBottomOfHierarchy | |
{ | |
static NewObjectBottomOfHierarchy() | |
{ |
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; | |
// Taken from: https://stackoverflow.com/questions/39380901/shake-an-object-back-and-forth-with-easing-at-the-end | |
public class ObjectShaker : MonoBehaviour | |
{ | |
public GameObject GameObjectToShake; | |
bool shaking = false; |
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; | |
public class RandomiseInsideCollider : MonoBehaviour | |
{ | |
public Collider2D AreaPolygonCollider; | |
Bounds Bounds; | |
Vector3 BoundX1, BoundX2, BoundY1, BoundY2; | |
Vector3 randomPos; | |
public Transform go; |
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; | |
/// <summary> | |
/// Drawing a Maurer Rose With Unity - http://diegogiacomelli.com.br/drawing-a-maurer-rose-with-unity | |
/// </summary> | |
[RequireComponent(typeof(LineRenderer))] | |
public class MaurerRoseLineRenderer : MonoBehaviour | |
{ | |
const int PointsCount = 361; |
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; | |
[RequireComponent(typeof(Rigidbody))] | |
public class CenterOfMass : MonoBehaviour | |
{ | |
public Vector3 _localCenterOfMass; | |
private void Awake() | |
{ | |
SetCenterOfMass(); |
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; | |
// REMEMBER that for custom attributes with property drawers, the attribute script should be in normal folder, while the drawer script - in the editor folder | |
public class AutofillAttribute : PropertyAttribute { } | |
[CustomPropertyDrawer(typeof(AutofillAttribute))] | |
public class AutofillAttributeDrawer : PropertyDrawer | |
{ |
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; |
NewerOlder