Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/fd9032be83893064e689 to your computer and use it in GitHub Desktop.
Save tsubaki/fd9032be83893064e689 to your computer and use it in GitHub Desktop.
リセット時に色々と設定する
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Camera), typeof(Collider), typeof(Transform))]
public class ResetTest : MonoBehaviour
{
[SerializeField]
Transform _transform;
[SerializeField]
Collider _collider;
[SerializeField]
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