RESOURCE UTILITIES
A downloadable tool
Download NowName your own price
Scriptable-objects that store references to assets in the Unity "Resources" folder.
EASY SET UP!
When assets are directly referenced in a Unity scene, they are loaded into memory. Furthermore, when prefabs are loaded into memory, their dependencies are loaded with them. These assets are occupying valuable space, even if they aren't active in the scene.
This package allows the user to control when referenced "Resource" assets are loaded into memory.
To use:
- Place the asset ("X") you want to reference in a folder called "Resources" (or a subfolder of "Resources")
- If X is a prefab: Create > Scriptable Objects > Utilities > Resources > Resource GameObject. If X is a sprite: Create > Scriptable Objects > Utilities > Resources > Resource Sprite.
- Select the Scriptable Object from step 2 and press the button that says "Refresh Folder".
- Enter X's name into the name field of the Scriptable Object.
- When scripts want to reference X, they should instead reference the paired Scriptable Object, and use the "Asset" property to load the original asset.
- Restructure your Resources folder without breaking string references.
- "Directly" reference resource assets without keeping them loaded in the scene.
- ResourceGameObject
- Create > Scriptable Objects > Utilities > Resources > Resource GameObject
- ResourceSprite
- Create > Scriptable Objects > Utilities > Resources > Resource Sprite
- ResourceTexture2D
- Create > Scriptable Objects > Utilities > Resources > Resource Texture2D
- Create > Scriptable Objects > Utilities > Resources > Resource Texture2D
This tool is also available on:
Updated | 27 days ago |
Status | Released |
Category | Tool |
Author | Iron Mountain |
Tags | Asset Pack, iron-mountain, resources, Unity |
Download
Download NowName your own price
Click download now to get access to the following files:
ResourceUtilities.unitypackage 23 kB
Leave a comment
Log in with itch.io to leave a comment.