25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

20 satır
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. }