2
0

Resource.cs 708 B

12345678910111213141516171819202122
  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. [MethodImpl(MethodImplOptions.InternalCall)]
  18. private static extern string Internal_GetName(IntPtr nativeInstance);
  19. }
  20. }