2
0

Resource.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. namespace BansheeEngine
  4. {
  5. /// <summary>
  6. /// Base class for all resources. Resources can be persistently referenced by scene objects or other resources.
  7. /// </summary>
  8. public class Resource : ScriptObject
  9. {
  10. /// <summary>
  11. /// Name of the resource. Use primarily for easier identification and not important to the engine itself.
  12. /// </summary>
  13. public string Name
  14. {
  15. get { return Internal_GetName(mCachedPtr); }
  16. }
  17. /// <summary>
  18. /// Returns a universally unique identifier of this resource.
  19. /// </summary>
  20. public string UUID
  21. {
  22. get { return Internal_GetUUID(mCachedPtr); }
  23. }
  24. [MethodImpl(MethodImplOptions.InternalCall)]
  25. private static extern string Internal_GetName(IntPtr nativeInstance);
  26. [MethodImpl(MethodImplOptions.InternalCall)]
  27. private static extern string Internal_GetUUID(IntPtr nativeInstance);
  28. }
  29. }