#Create a Handle manually

6 messages · Page 1 of 1 (latest)

boreal belfry
#

Hello, I'm currently trying to construct an asset manually in code instead of loading it and later pushing that into a resource that contains handles to previously loaded assets.

But I can't seem to be able to create a handle myself?

let asset = MyAsset { something = 23 };

all_my_assets.0.push(asset); // Complains because it isn't of type Handle<MyAsset>

is there anything i can do?

copper storm
boreal belfry
#

hm, is there any real difference?

copper storm
#

I’m not sure 😅