The UI for Unity's SerealizedReference attribute. It allows to change the instance type of field right in editor.
Go to file
2022-12-28 17:05:22 +01:00
Editor Update SerializeReferenceButtonAttributeDrawer.cs 2022-12-28 17:05:22 +01:00
Runtime formatting 2022-12-28 14:03:46 +01:00
Samples~ achievement system example 2022-12-28 14:56:13 +01:00
.gitignore Created new brunch. Plug in Rider's version control 2020-05-16 18:18:03 +03:00
Editor.meta split runtime and editor 2022-12-28 13:55:36 +01:00
LICENSE.txt organize into upm directory structure 2021-05-26 14:44:53 -04:00
LICENSE.txt.meta organize into upm directory structure 2021-05-26 14:44:53 -04:00
package.json Update package.json 2022-12-28 14:56:16 +01:00
package.json.meta add package json 2021-05-26 14:37:00 -04:00
README.md Update README.md 2022-03-26 13:44:39 +03:00
README.md.meta add package json 2021-05-26 14:37:00 -04:00
Runtime.meta split runtime and editor 2022-12-28 13:55:36 +01:00

UnitySerializedReferenceUI

The UI for Unity's SerealizedReference attribute. It allows to change the instance type of field right in editor.

Project is provided under Mit license which you can find in inner main folder ("SerializedReferenceUI")

Known limitations.

  • Custom property drawer has no effect. Becouse property is drawn from custom attribute drawer custom property drawer is not applied (unity default behaviour).
  • Can not serialized types derived from UnityEngine.Object (monbehaviour, scriptableObject) (unity's limitation).
  • Can not create instance of class that does not have empty constructor(only have private for example).

Known Issues of serialized reference:

  • Renaming used type can produce data loss and throws unknown managed type exception. This is unity's bug.
  • SerializeReference itself is not working properly with Prefab Instances;

Future plans: Possibly

  • copy / paste.
  • menu with searchbar.

Installation

Use the + inside the Package Manager window and add this URL:

https://github.com/TextusGames/UnitySerializedReferenceUI.git

image image

Or add id to your packages.json file manually (located inside the project's Packages folder).

"com.textus-games.serialized-reference-ui": "https://github.com/TextusGames/UnitySerializedReferenceUI.git"

Example

Woah UI woah woah!!!

[Serializable]
public class Slot
{
    [SerializeReference, SerializeReferenceButton]
    public Item item;
}

[Serializable]
public class Item {}
public class Metal : Item {}
public class Wood : Item {}

For more examples, this package contains two Samples that can be imported into your project.