mirror of
https://github.com/maxartz15/UnitySerializedReferenceUI.git
synced 2025-06-27 22:56:11 +02:00
Major refactor.
Core now formed and contains all useful utility to create custom ui with restrictions. Many methods was extracted from different classes and moved to core. Undo is now supported(because unity's undo bug seems to be fixed). Example now moved into same level separate folder.
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c99b932d88d36e9439bb3e944b823502
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "AmimalWorld"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b7100eb7c609e2418517e5c25caaf2a
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4a0269d5bc8b7345b6e2b1160c596db
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class AnimalBase : IAnimal
|
||||
{
|
||||
[SerializeField] protected float age;
|
||||
public GameObject food;
|
||||
public virtual void Feed()
|
||||
{
|
||||
Debug.Log("Thanks");
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AnimalChild : AnimalBase {}
|
||||
|
||||
[Serializable]
|
||||
public abstract class AnimalGrandChildAbstract : AnimalBase
|
||||
{
|
||||
public string someString;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AbstractAnimalGrandChild : AnimalGrandChildAbstract {}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public abstract class AbstractAnimal : IAnimal
|
||||
{
|
||||
[SerializeField] protected float age;
|
||||
public GameObject food;
|
||||
public virtual void Feed()
|
||||
{
|
||||
Debug.Log("Thanks");
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AbstractAnimalChild : AbstractAnimal {}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c24236542320b8b438a9c637fc34365c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,4 @@
|
||||
public interface IAnimal
|
||||
{
|
||||
void Feed();
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e7999ba5a7a8e941923ff9d8795fd59
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
[Serializable]
|
||||
public abstract class MammalBase : AnimalBase
|
||||
{
|
||||
public int numberOfBones;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7dae106e8c3cf94198d8c1d0e9bce89
|
||||
timeCreated: 1579584059
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05ba0cd389296cf44af17c4e8362fb75
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 375e18944bf750b45b54b9715b23432a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d16251d523e3f02469f6ce9d3adef548
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
|
||||
public abstract class ApeBase : MammalBase, IApe
|
||||
{
|
||||
public string Tag = default;
|
||||
}
|
||||
|
||||
public interface IApe
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class RedApe : ApeBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GoldenApe : ApeBase
|
||||
{
|
||||
|
||||
}
|
||||
public class GreenApe : ApeBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class BlackApe : ApeBase
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03b5cf869ca49e343ae00efa8baef1c4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
|
||||
public abstract class CatBase : MammalBase, ICat
|
||||
{
|
||||
public string Tag = default;
|
||||
}
|
||||
|
||||
public interface ICat
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class RedCat : CatBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GoldenCat : CatBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GreenCat : CatBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class BlackCat : CatBase
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58428c0f2b16db849ad5d61a465d7cbd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
|
||||
public abstract class DogBase : MammalBase, IDog
|
||||
{
|
||||
public string Tag = default;
|
||||
}
|
||||
|
||||
public interface IDog
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class RedDog : DogBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GoldenDog : DogBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GreenDog : DogBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class BlackDog : DogBase
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5c4ea427575d4745813d1a491196ed6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,28 @@
|
||||
public abstract class FishBase : AnimalBase, IFish
|
||||
{
|
||||
public string Tag = default;
|
||||
}
|
||||
|
||||
public interface IFish
|
||||
{
|
||||
|
||||
}
|
||||
public class RedFish : FishBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GoldenFish : FishBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GreenFish : FishBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class BlackFish : FishBase
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de7faf3ac188d5b4fa97a6f504cb5060
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
|
||||
public abstract class InsectBase : AnimalBase, IInsect
|
||||
{
|
||||
public string Tag = default;
|
||||
}
|
||||
|
||||
public interface IInsect
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class RedInsect : InsectBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GoldenInsect : InsectBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GreenInsect : InsectBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class BlackInsect : InsectBase
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 198f13bdfb700f5478f48fa2c8b459c0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "SerializedReferenceExample",
|
||||
"references": [
|
||||
"GUID:6b7100eb7c609e2418517e5c25caaf2a",
|
||||
"GUID:73106583b323919458c1e05166706ce3"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d3c3657da68d4a4e95079ed1fad6bb2
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe686aa525f35e14498d533b056e962b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32f0237ba42624e46ac3f3ffe9234032
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,62 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: SampleSceneSettings
|
||||
serializedVersion: 2
|
||||
m_GIWorkflowMode: 1
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_UsingShadowmask: 1
|
||||
m_BakeBackend: 0
|
||||
m_LightmapMaxSize: 1024
|
||||
m_BakeResolution: 40
|
||||
m_Padding: 2
|
||||
m_TextureCompression: 1
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 2
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 2
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherRayCount: 256
|
||||
m_FinalGatherFiltering: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRRussianRouletteStartBounce: 2
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41149e767ac7dcd47a90a6570ba736eb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,234 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1131539293
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1131539295}
|
||||
- component: {fileID: 1131539294}
|
||||
m_Layer: 0
|
||||
m_Name: Test
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1131539294
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1131539293}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 198888d66cd7476e973e8c52f7f8f04f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
restrictedAnimals:
|
||||
id: 0
|
||||
animalInterface:
|
||||
id: 1
|
||||
animalAbstract:
|
||||
id: 2
|
||||
animalBaseClass:
|
||||
id: 3
|
||||
animalsWithInterfaces:
|
||||
- id: 4
|
||||
- id: 5
|
||||
animalsWithInterfacesMenu: []
|
||||
classWithChildReferences:
|
||||
- integerValue: 0
|
||||
animals:
|
||||
id: 6
|
||||
animalInterfaces:
|
||||
id: 7
|
||||
references:
|
||||
version: 1
|
||||
00000000:
|
||||
type: {class: GoldenApe, ns: , asm: SerializedReferenceExample}
|
||||
data:
|
||||
age: 1231
|
||||
food: {fileID: 1131539293}
|
||||
numberOfBones: 33
|
||||
Tag: dd
|
||||
00000001:
|
||||
type: {class: AnimalChild, ns: , asm: AmimalWorld}
|
||||
data:
|
||||
age: 3213
|
||||
food: {fileID: 0}
|
||||
00000002:
|
||||
type: {class: , ns: , asm: }
|
||||
00000003:
|
||||
type: {class: GoldenCat, ns: , asm: SerializedReferenceExample}
|
||||
data:
|
||||
age: 0
|
||||
food: {fileID: 0}
|
||||
numberOfBones: 0
|
||||
Tag:
|
||||
00000004:
|
||||
type: {class: GoldenCat, ns: , asm: SerializedReferenceExample}
|
||||
data:
|
||||
age: 0
|
||||
food: {fileID: 0}
|
||||
numberOfBones: 0
|
||||
Tag:
|
||||
00000005:
|
||||
type: {class: RedApe, ns: , asm: SerializedReferenceExample}
|
||||
data:
|
||||
age: 0
|
||||
food: {fileID: 0}
|
||||
numberOfBones: 0
|
||||
Tag:
|
||||
00000006:
|
||||
type: {class: BlackApe, ns: , asm: SerializedReferenceExample}
|
||||
data:
|
||||
age: 0
|
||||
food: {fileID: 0}
|
||||
numberOfBones: 0
|
||||
Tag:
|
||||
00000007:
|
||||
type: {class: GreenFish, ns: , asm: SerializedReferenceExample}
|
||||
data:
|
||||
age: 0
|
||||
food: {fileID: 0}
|
||||
Tag:
|
||||
--- !u!4 &1131539295
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1131539293}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.4785227, y: 0.00097347796, z: -2.9921875}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2cda990e2423bbf4892e6590ba056729
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Test : MonoBehaviour
|
||||
{
|
||||
[Header("Restricted to DogBase and IApe")]
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
[SerializeReferenceUIRestrictionIncludeTypes(typeof(DogBase), typeof(IApe))]
|
||||
public IAnimal restrictedAnimals = default;
|
||||
|
||||
[Header("Interface")]
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
public IAnimal animalInterface = default;
|
||||
|
||||
[Header("Abstract")]
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
public AbstractAnimal animalAbstract = default;
|
||||
|
||||
[Header("Base Class")]
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
public AnimalBase animalBaseClass = default;
|
||||
|
||||
|
||||
[Header("List of interfaces")]
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
public List<IAnimal> animalsWithInterfaces = new List<IAnimal>();
|
||||
|
||||
|
||||
[Header("List of Animals via MMB menu")]
|
||||
[SerializeReference]
|
||||
[SerializeReferenceMenu]
|
||||
public List<AnimalBase> animalsWithInterfacesMenu = new List<AnimalBase>();
|
||||
|
||||
|
||||
[Header("Class with serialized reference field")]
|
||||
public List<ClassWithSerializedReferenceChild> classWithChildReferences = default;
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class ClassWithSerializedReferenceChild
|
||||
{
|
||||
public int integerValue = default;
|
||||
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
public AnimalBase animals = default;
|
||||
|
||||
[SerializeReference]
|
||||
[SerializeReferenceButton]
|
||||
public IAnimal animalInterfaces = default;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 198888d66cd7476e973e8c52f7f8f04f
|
||||
timeCreated: 1579584059
|
Reference in New Issue
Block a user