Merge pull request #8 from popcron/master

Example in readme and UPM
This commit is contained in:
TextusGames 2022-03-26 13:14:05 +03:00 committed by GitHub
commit 5b062f4927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
79 changed files with 57 additions and 20 deletions

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f549199d6eac96943ae073e003f12aa3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f124bd3bbd4e5e44882fcc7ca4bbfd89
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -16,3 +16,28 @@ Future plans:
Possibly
- copy / paste.
- menu with searchbar.
## Installation
Use the + inside the Package Manager window and add this URL:
```json
"com.textus-games.serialized-reference-ui": "https://github.com/popcron/UnitySerializedReferenceUI.git"
```
Or add id to your `packages.json` file manually (located inside the project's Packages folder).
## Example
![Woah UI woah woah!!!](https://cdn.discordapp.com/attachments/784916261871550494/847185548632260628/unknown.png)
```cs
[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.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 05ba0cd389296cf44af17c4e8362fb75
guid: fd7a1ed385c62e3499468681006ce64e
TextScriptImporter:
externalObjects: {}
userData:

29
package.json Normal file
View File

@ -0,0 +1,29 @@
{
"name": "com.textus-games.serialized-reference-ui",
"version": "1.0.0",
"displayName": "Serialize Reference UI",
"description": "The UI for Unity's SerealizedReference attribute. It allows changing the instance type of a field right in the editor.",
"unity": "2019.3",
"keywords":
[
"serialization",
"editor",
"utility"
],
"samples":
[
{
"displayName": "Animal world Assembly",
"path": "Samples~/ExampleAnimalWorldAssembly"
},
{
"displayName": "Usage from different Assembly",
"path": "Samples~/ExampleOfUsageFromDifferentAssembly"
}
],
"author":
{
"name": "Textus Games",
"url": "https://github.com/TextusGames"
}
}

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: 45856e53c605df64baf0e89751741df7
folderAsset: yes
DefaultImporter:
guid: bea6fab46aed07d488468ef87df6c1f5
PackageManifestImporter:
externalObjects: {}
userData:
assetBundleName: