CameraEffectProxyPrefabData.cs 916 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using UnityEngine;
  3. namespace DatabaseModel
  4. {
  5. public class CameraEffectProxyPrefabData
  6. {
  7. public int id { get; set; }
  8. public string type { get; set; }
  9. public string name { get; set; }
  10. public string path { get; set; }
  11. public string usedEffect { get; set; }
  12. public string desc { get; set; }
  13. public static GameObject GetPrefab(int id)
  14. {
  15. CameraEffectProxyPrefabData cameraEffectProxyPrefabData = DB.CameraEffectProxyPrefabData[id];
  16. return Asset.LoadFromResources<GameObject>(cameraEffectProxyPrefabData.path, cameraEffectProxyPrefabData.name);
  17. }
  18. public static CameraEffectProxyPrefabData SetValue(string[] strings)
  19. {
  20. return new CameraEffectProxyPrefabData
  21. {
  22. id = int.Parse(strings[0]),
  23. type = strings[1],
  24. name = strings[2],
  25. path = strings[3],
  26. usedEffect = strings[4],
  27. desc = strings[5]
  28. };
  29. }
  30. }
  31. }