New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

com.iron-mountain.resource-utilities

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.iron-mountain.resource-utilities

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

  • 1.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

Resource Utilities

Version: 1.1.4

Description:

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.

Use Cases:

  • Restructure your Resources folder without breaking string references.
  • "Directly" reference resource assets without keeping them loaded in the scene.

Directions for Use:

  1. Place the asset ("X") you want to reference in a folder called "Resources" (or a subfolder of "Resources")
  2. If X is a prefab: Create > Scriptable Objects > Utilities > Resources > Resource GameObject. If X is a sprite: Create > Scriptable Objects > Utilities > Resources > Resource Sprite.
  3. Select the Scriptable Object from step 2 and press the button that says "Refresh Folder".
  4. Enter X's name into the name field of the Scriptable Object.
  5. When scripts want to reference X, they should instead reference the paired Scriptable Object, and use the "Asset" property to load the original asset.

Package Mirrors:

Key Scripts & Components:

  1. public abstract class ResourceAsset`1 : ScriptableObject
    • Properties:
      • public String ResourcePath { get; }
      • public T Asset { get; }
    • Methods:
      • public void Initialize(String assetFolder, String assetName)
  2. public class ResourceGameObject : ResourceAsset`1
  3. public class ResourceSprite : ResourceAsset`1
    • Properties:
      • public Sprite Asset { get; }
  4. public class ResourceTexture2D : ResourceAsset`1
    • Properties:
      • public Texture2D Asset { get; }
  5. public static class ResourcesUtility

Keywords

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc