Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created April 23, 2015 16:11
Show Gist options
  • Save tsubaki/f1983724f373d10c7779 to your computer and use it in GitHub Desktop.
Save tsubaki/f1983724f373d10c7779 to your computer and use it in GitHub Desktop.
HideInInspector 設定版
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Camera), typeof(Collider), typeof(Transform))]
public class ResetTest : MonoBehaviour
{
[SerializeField, HideInInspector]
Transform _transform;
[SerializeField, HideInInspector]
Collider _collider;
[SerializeField, HideInInspector]
Camera _camera;
void Reset ()
{
_transform = GetComponent<Transform>();
_collider = GetComponent<Collider>();
_camera = GetComponent<Camera>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment