GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NPTP/ReferenceableScriptables: Use Scriptable Objects like Addressables, but loading the same instances from disk that are referenced in scenes & prefabs.

BranchesTags
Open more actions menu

Latest commit

 

History

36 Commits
36 Commits

Folders and files

NameName
Last commit message
Last commit date
Editor
Editor
 
 
Runtime
Runtime
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CHANGELOG.md.meta
CHANGELOG.md.meta
 
 
Editor.meta
Editor.meta
 
 
LICENSE
LICENSE
 
 
LICENSE.meta
LICENSE.meta
 
 
README.md
README.md
 
 
README.md.meta
README.md.meta
 
 
Runtime.meta
Runtime.meta
 
 
package.json
package.json
 
 
package.json.meta
package.json.meta
 
 

Repository files navigation

Referenceable Scriptables

The Addressables package has a limitation when used in conjunction with a Scriptable Object (SO) in Unity.

Addressable SOs get baked into their own asset library. Let's say we have an SO named "MyAsset".

If we reference "MyAsset" in a serialized field of type ScriptableObject, we'll refer to it as "MyAsset-A". The version of the asset in the Addressables library is a copy, which we'll refer to as "MyAsset-B".

If we check "MyAsset-A" == "MyAsset-B" in code, we will get false, even though we thought we were checking the same asset!

Enter this package, which allows you to treat SOs like Addressables, putting them anywhere in your project, checking a box and loading them in and out as required, but when you load "MyAsset", you are always getting "MyAsset-A" - the same one you expect when you reference "MyAsset" directly in a serialized field.

Under the hood this automatically leverages Unity's Resources system without being forced to use Resources in the usual clunky way (fixed paths, fixed data locations, etc).

Just check the box marked "Referenceable" at the top of the inspector on any ScriptableObject, or use the menu at Tools/Referenceables Management to modify this setting in aggregate on scriptable objects in your project.

Any SO marked "Referenceable" can also have its ID serialized - this means your save/load system can recall and load SO assets by the ID alone.

About

Use Scriptable Objects like Addressables, but loading the same instances from disk that are referenced in scenes & prefabs.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.