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 UnityEngine; | |
using System.Collections; | |
using UnityEngine.Events; | |
namespace Cluster { | |
public class CollisionCall : MonoBehaviour { | |
public LayerMask layerMask = -1; |
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 UnityEngine; | |
using System.Linq; | |
public class GearRotator : MonoBehaviour | |
{ | |
[SerializeField] private float m_radiusThreshold = 4f; | |
private float m_startingAngle; | |
private Quaternion m_startingRotation; |
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
// You can switch to a regular Update() loop | |
// if you comment out this line. (makes debugging easier) | |
#define COROUTINE | |
// | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Text; | |
using UnityEngine; | |
using Debug = UnityEngine.Debug; |
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
#if UNITY_EDITOR | |
void SingleComponentCheck() { | |
var components = gameObject.GetComponents(this.GetType()); | |
foreach (var component in components) { | |
if (component == this) continue; | |
UnityEditor.EditorUtility.DisplayDialog("Can't add the same component multiple times!", | |
string.Format("The component {0} can't be added because {1} already contains the same component.", this.GetType(), gameObject.name), | |
"Cancel"); |
NewerOlder