public ResourceRefList GetResourceRefList(StringHash key, ResourceRefList @default = null) { IntPtr instance = IntPtr.Zero; Urho3D_Object_Event_GetResourceRefList(_map, key.Hash, ref instance); if (instance == IntPtr.Zero) { return(@default); } return(ResourceRefList.GetManagedInstance(instance)); }
public static string GetFilters(ResourceRefList refList) { foreach (FieldInfo fi in typeof(UrhoConstants).GetFields(BindingFlags.Static | BindingFlags.Public)) { StringHash val = fi.GetValue(null) as StringHash; if (val.Value == refList.GetResourceType()) { ResourceExtensions ext = fi.GetCustomAttribute <ResourceExtensions>(); if (ext != null) { return(ext.Filter); } return(null); } } return(null); }
public void SetResourceRefList(StringHash key, ResourceRefList value) { Urho3D_Object_Event_SetResourceRefList(_map, key.Hash, value.NativeInstance); }