Skip to content

Package for Unity that provides functionality for cross-scene references. Inspired by https://github.com/Unity-Technologies/guid-based-reference. Supports Unity Package Manager.

License

Notifications You must be signed in to change notification settings

SanielX/Guid-References

 
 

Repository files navigation

Fork note

For original documentation read: https://github.com/Unity-Technologies/guid-based-reference

It turned out that changing GameObject type to just UnityEngine.Object doesn't seem to break the tests so I added functionality for references directly to components.

What I have done is that for each GuidComponent I added SerializableDictionary (https://github.com/azixMcAze/Unity-SerializableDictionary) which contains every component of a GameObject.

What you do is adding new attribute to GuidReference:

[GuidReferenceType(typeof(*YOUR TYPE*))]
public GuidReference MyReference;

And now you should be able to drag and drop cross scene object. Code is written kinda poorly, because I just wanted to see if it's going to work. And seems like it does.

In Demo scene you can see how light references appears as level loads

For GuidComponents you need to press Update Components in order to get them updated, obviously.

About

Package for Unity that provides functionality for cross-scene references. Inspired by https://github.com/Unity-Technologies/guid-based-reference. Supports Unity Package Manager.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%