Ver Fonte

Add the GetResourceDirs function into C# ResourceCache

weinand há 8 anos atrás
pai
commit
7a89cedb04
1 ficheiros alterados com 15 adições e 0 exclusões
  1. 15 0
      Script/AtomicNET/AtomicNET/Resource/ResourceCache.cs

+ 15 - 0
Script/AtomicNET/AtomicNET/Resource/ResourceCache.cs

@@ -1,4 +1,5 @@
 using System;
 using System;
+using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using System.Runtime.InteropServices;
 
 
 namespace AtomicEngine
 namespace AtomicEngine
@@ -29,6 +30,20 @@ namespace AtomicEngine
             return null;
             return null;
         }
         }
 
 
+        public List<string> GetResourceDirs()
+        {
+            List<string> resourceDirs = new List<string>();
+
+            ResourceCache cache = AtomicNET.GetSubsystem<ResourceCache>();
+
+            for (uint i = 0; i < cache.GetNumResourceDirs(); i++)
+            {
+                resourceDirs.Add(cache.GetResourceDir(i));
+            }
+
+            return resourceDirs;
+        }
+
         /// <summary>
         /// <summary>
         ///  Release all resources. When called with the force flag false, releases all currently unused resources.
         ///  Release all resources. When called with the force flag false, releases all currently unused resources.
         /// </summary>
         /// </summary>