選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

20 行
292 B

  1. using System;
  2. using UnityEngine;
  3. public class MagicalReference<T> where T : UnityEngine.Object
  4. {
  5. public T reference
  6. {
  7. get
  8. {
  9. if (this._ref == null)
  10. {
  11. this._ref = UnityEngine.Object.FindObjectOfType<T>();
  12. }
  13. return this._ref;
  14. }
  15. }
  16. private T _ref;
  17. }