Skip to main content

IResourcesAPIMethods

Trait IResourcesAPIMethods 

Source
pub trait IResourcesAPIMethods: IResourcesAPI {
    // Provided methods
    fn ctor(self) { ... }
    fn find_objects_of_type_all(
        self,
        system_type_instance: impl Into<SystemType>,
    ) -> Array<Object_2> { ... }
    fn find_shader_by_name(self, name: impl Into<Il2CppString>) -> Shader { ... }
    fn load(
        self,
        path: impl Into<Il2CppString>,
        system_type_instance: impl Into<SystemType>,
    ) -> Object_2 { ... }
    fn load_all(
        self,
        path: impl Into<Il2CppString>,
        system_type_instance: impl Into<SystemType>,
    ) -> Array<Object_2> { ... }
    fn load_async(
        self,
        path: impl Into<Il2CppString>,
        system_type_instance: impl Into<SystemType>,
    ) -> ResourceRequest { ... }
    fn unload_asset(self, asset_to_unload: impl Into<Object_2>) { ... }
}

Provided Methods§

Source

fn ctor(self)

.ctor() overload

Source

fn find_objects_of_type_all( self, system_type_instance: impl Into<SystemType>, ) -> Array<Object_2>

FindObjectsOfTypeAll(::unity::SystemType) overload

Source

fn find_shader_by_name(self, name: impl Into<Il2CppString>) -> Shader

FindShaderByName(::unity::Il2CppString) overload

Source

fn load( self, path: impl Into<Il2CppString>, system_type_instance: impl Into<SystemType>, ) -> Object_2

Load(::unity::Il2CppString, ::unity::SystemType) overload

Source

fn load_all( self, path: impl Into<Il2CppString>, system_type_instance: impl Into<SystemType>, ) -> Array<Object_2>

LoadAll(::unity::Il2CppString, ::unity::SystemType) overload

Source

fn load_async( self, path: impl Into<Il2CppString>, system_type_instance: impl Into<SystemType>, ) -> ResourceRequest

LoadAsync(::unity::Il2CppString, ::unity::SystemType) overload

Source

fn unload_asset(self, asset_to_unload: impl Into<Object_2>)

UnloadAsset(crate::unity_engine::object_2::Object_2) overload

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<__T: IResourcesAPI> IResourcesAPIMethods for __T

Available on crate feature unity_engine-resourcesapi only.