LocalizeTargetDesc.cs 349 B

123456789101112131415161718
  1. using System;
  2. using UnityEngine;
  3. namespace I2.Loc
  4. {
  5. public abstract class LocalizeTargetDesc<T> : ILocalizeTargetDescriptor where T : ILocalizeTarget
  6. {
  7. public override ILocalizeTarget CreateTarget(Localize cmp)
  8. {
  9. return ScriptableObject.CreateInstance<T>();
  10. }
  11. public override Type GetTargetType()
  12. {
  13. return typeof(T);
  14. }
  15. }
  16. }