diff --git a/Old version_1.0/Assets/HGF.meta b/Old version_1.0/Assets/HGF.meta new file mode 100644 index 0000000..cac4f5c --- /dev/null +++ b/Old version_1.0/Assets/HGF.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a0b1d569b6c27444382ba78f08496906 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scenes.meta b/Old version_1.0/Assets/HGF/Scenes.meta new file mode 100644 index 0000000..9e9a8e9 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8eab42bc5b0f04f489e4fec4b88b16bb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scenes/Demo.unity b/Old version_1.0/Assets/HGF/Scenes/Demo.unity new file mode 100644 index 0000000..8f197ee --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scenes/Demo.unity @@ -0,0 +1,2338 @@ +%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: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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.12731704, g: 0.13414727, b: 0.121078536, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + 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: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + 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_LightingSettings: {fileID: 0} +--- !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 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &275541969 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 275541970} + - component: {fileID: 275541972} + - component: {fileID: 275541971} + - component: {fileID: 275541973} + m_Layer: 5 + m_Name: TouchBack + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &275541970 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275541969} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 739665118} + - {fileID: 950291174} + m_Father: {fileID: 833643127} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &275541971 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275541969} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &275541972 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275541969} + m_CullTransparentMesh: 1 +--- !u!114 &275541973 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275541969} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 275541971} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1534613769} + m_TargetAssemblyTypeName: ScenesScripts.GalPlot.GalManager, Assembly-CSharp + m_MethodName: Button_Click_NextPlot + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &561302770 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 561302771} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &561302771 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 561302770} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1222902481} + - {fileID: 1153046670} + - {fileID: 801894614} + - {fileID: 1165118493} + m_Father: {fileID: 1284363936} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -0.0017089844, y: 0.00012207031} + m_SizeDelta: {x: 0.003418, y: 0.00021362} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &730832295 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 730832296} + - component: {fileID: 730832297} + m_Layer: 5 + m_Name: Control-Right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &730832296 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 730832295} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2064238918} + m_Father: {fileID: 739665118} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 509.81702, y: -79.86484} + m_SizeDelta: {x: -1019.6342, y: 159.7296} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &730832297 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 730832295} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 100 + m_Top: 20 + m_Bottom: 0 + m_ChildAlignment: 2 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &739665117 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 739665118} + m_Layer: 5 + m_Name: Control + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &739665118 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 739665117} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1815868749} + - {fileID: 730832296} + m_Father: {fileID: 275541970} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -74.65784} + m_SizeDelta: {x: -0.0002, y: 141.3334} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &782858428 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 782858429} + m_Layer: 0 + m_Name: AudioSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &782858429 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 782858428} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1944636609} + - {fileID: 1832857650} + - {fileID: 1734966956} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &801894613 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 801894614} + - component: {fileID: 801894616} + - component: {fileID: 801894615} + m_Layer: 5 + m_Name: Text-Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &801894614 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 801894613} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 561302771} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -71.3} + m_SizeDelta: {x: 1706.4, y: 195.9704} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &801894615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 801894613} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 35 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &801894616 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 801894613} + m_CullTransparentMesh: 1 +--- !u!1 &833643123 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 833643127} + - component: {fileID: 833643126} + - component: {fileID: 833643125} + - component: {fileID: 833643124} + m_Layer: 5 + m_Name: MainCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &833643124 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 833643123} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &833643125 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 833643123} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &833643126 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 833643123} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 1 + m_Camera: {fileID: 1197264735} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &833643127 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 833643123} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1218022792} + - {fileID: 2119107102} + - {fileID: 1284363936} + - {fileID: 275541970} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &950291173 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 950291174} + - component: {fileID: 950291175} + - component: {fileID: 950291176} + m_Layer: 5 + m_Name: Choice + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &950291174 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950291173} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 275541970} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0.4633789, y: -72.664} + m_SizeDelta: {x: 0.927, y: -145.33} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &950291175 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950291173} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 40 + m_Bottom: 0 + m_ChildAlignment: 1 + m_Spacing: 60 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &950291176 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950291173} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b881bc00d6924c94e9caaeb957f23cde, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &980602827 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 980602828} + - component: {fileID: 980602830} + - component: {fileID: 980602829} + - component: {fileID: 980602831} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &980602828 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 980602827} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2064238918} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: -0.000026703, y: 45.169} + m_SizeDelta: {x: 57.046, y: 57.046} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &980602829 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 980602827} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 5228298a97e611646b6295f516f7a62d, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &980602830 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 980602827} + m_CullTransparentMesh: 1 +--- !u!114 &980602831 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 980602827} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.75686276} + m_EffectDistance: {x: 2, y: -2.28} + m_UseGraphicAlpha: 1 +--- !u!1 &1153046669 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1153046670} + - component: {fileID: 1153046672} + - component: {fileID: 1153046671} + m_Layer: 5 + m_Name: Img-Segmentation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1153046670 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1153046669} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 561302771} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -10.620003, y: 45} + m_SizeDelta: {x: 1707.1821, y: 5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1153046671 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1153046669} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.39215687} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1153046672 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1153046669} + m_CullTransparentMesh: 1 +--- !u!1 &1165118492 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165118493} + - component: {fileID: 1165118496} + - component: {fileID: 1165118495} + - component: {fileID: 1165118494} + m_Layer: 5 + m_Name: Button_Next + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1165118493 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165118492} + m_LocalRotation: {x: -0, y: -0, z: -0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 561302771} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -229.75, y: 90.79998} + m_SizeDelta: {x: 52.895, y: 52.895} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1165118494 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165118492} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d0390bd8b8ffd640b34fe25065ff1df, type: 3} + m_Name: + m_EditorClassIdentifier: + updateType: 0 + isSpeedBased: 0 + hasOnStart: 0 + hasOnPlay: 0 + hasOnUpdate: 0 + hasOnStepComplete: 0 + hasOnComplete: 1 + hasOnTweenCreated: 0 + hasOnRewind: 0 + onStart: + m_PersistentCalls: + m_Calls: [] + onPlay: + m_PersistentCalls: + m_Calls: [] + onUpdate: + m_PersistentCalls: + m_Calls: [] + onStepComplete: + m_PersistentCalls: + m_Calls: [] + onComplete: + m_PersistentCalls: + m_Calls: [] + onTweenCreated: + m_PersistentCalls: + m_Calls: [] + onRewind: + m_PersistentCalls: + m_Calls: [] + targetIsSelf: 1 + targetGO: {fileID: 0} + tweenTargetIsTargetGO: 1 + delay: 1 + duration: 0.5 + easeType: 14 + easeCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + loopType: 1 + loops: -1 + id: 1 + isRelative: 0 + isFrom: 0 + isIndependentUpdate: 1 + autoKill: 1 + autoGenerate: 1 + isActive: 1 + isValid: 1 + target: {fileID: 1165118493} + animationType: 1 + targetType: 5 + forcedTargetType: 0 + autoPlay: 1 + useTargetAsV3: 0 + endValueFloat: 0 + endValueV3: {x: -229.75, y: 73.073, z: 0} + endValueV2: {x: 0, y: 0} + endValueColor: {r: 1, g: 1, b: 1, a: 1} + endValueString: + endValueRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + endValueTransform: {fileID: 0} + optionalBool0: 0 + optionalBool1: 0 + optionalFloat0: 0 + optionalInt0: 0 + optionalRotationMode: 0 + optionalScrambleMode: 0 + optionalString: +--- !u!114 &1165118495 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165118492} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.9411765} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 2700cee38cbcae74abebc18aba2d5963, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1165118496 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165118492} + m_CullTransparentMesh: 0 +--- !u!1 &1197264733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1197264736} + - component: {fileID: 1197264735} + - component: {fileID: 1197264734} + - component: {fileID: 1197264737} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1197264734 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197264733} + m_Enabled: 1 +--- !u!20 &1197264735 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197264733} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1197264736 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197264733} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1197264737 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197264733} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!1 &1218022791 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1218022792} + - component: {fileID: 1218022794} + - component: {fileID: 1218022793} + - component: {fileID: 1218022796} + - component: {fileID: 1218022797} + m_Layer: 5 + m_Name: Img-Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1218022792 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1218022791} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 833643127} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2136, y: 1068} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1218022793 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1218022791} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 3a5e6ebf7f2c28d46bd8a3f553687fc0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1218022794 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1218022791} + m_CullTransparentMesh: 1 +--- !u!114 &1218022796 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1218022791} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae12d1bbe863d1b41a47672fd1c49d9e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1218022797 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1218022791} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3508eebb8790e404d9b119c00020c8e1, type: 3} + m_Name: + m_EditorClassIdentifier: + textureOriginSize: {x: 2048, y: 1024} +--- !u!1 &1222902480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1222902481} + - component: {fileID: 1222902483} + - component: {fileID: 1222902482} + m_Layer: 5 + m_Name: Text-Name + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1222902481 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222902480} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 561302771} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -0.099975586, y: 102.38354} + m_SizeDelta: {x: 1706.3999, y: 80.586} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1222902482 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222902480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 55 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 50 + m_MaxSize: 55 + m_Alignment: 6 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1222902483 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222902480} + m_CullTransparentMesh: 1 +--- !u!1 &1284363935 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1284363936} + - component: {fileID: 1284363938} + - component: {fileID: 1284363937} + - component: {fileID: 1284363939} + m_Layer: 5 + m_Name: Dialog + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1284363936 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1284363935} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 561302771} + m_Father: {fileID: 833643127} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0.16308594, y: 170.76355} + m_SizeDelta: {x: 0.32641602, y: 426.6047} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1284363937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1284363935} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.05819916, g: 0.0071199574, b: 0.11320752, a: 0.9607843} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 2e3a699fee5e79448a8e96d158bbee7a, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1284363938 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1284363935} + m_CullTransparentMesh: 1 +--- !u!114 &1284363939 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1284363935} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: be1c5720203259149a471ba8c12d2566, type: 3} + m_Name: + m_EditorClassIdentifier: + Text_TextContent: {fileID: 801894615} + Text_CharacterName: {fileID: 1222902482} + Button_Next: {fileID: 1165118492} +--- !u!1 &1534613765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1534613768} + - component: {fileID: 1534613767} + - component: {fileID: 1534613766} + - component: {fileID: 1534613769} + - component: {fileID: 1534613770} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1534613766 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534613765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1534613767 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534613765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1534613768 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534613765} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1534613769 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534613765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4187ce6bb31fd5443a2e7eb384144de7, type: 3} + m_Name: + m_EditorClassIdentifier: + Gal_Text: {fileID: 1284363939} + Gal_CharacterImg: {fileID: 2119107103} + Gal_Choice: {fileID: 950291176} + Gal_BackImg: {fileID: 1218022796} + CharacterNum: 0 +--- !u!82 &1534613770 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534613765} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!1 &1699916270 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1699916271} + - component: {fileID: 1699916274} + - component: {fileID: 1699916273} + - component: {fileID: 1699916272} + m_Layer: 5 + m_Name: Button-Home + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1699916271 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699916270} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1815868749} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 185.50098, y: -57.2295} + m_SizeDelta: {x: 171.002, y: 74.459} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1699916272 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699916270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 2 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: -195125735, guid: fb9452c9b2ce7c94baa71e75cfc4ce59, + type: 3} + m_PressedSprite: {fileID: -351231945, guid: fb9452c9b2ce7c94baa71e75cfc4ce59, + type: 3} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1699916273} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1699916273 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699916270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 02a6ef37b54c5154a93cbbbe0ae26bc6, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1699916274 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699916270} + m_CullTransparentMesh: 1 +--- !u!1 &1734966955 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1734966956} + - component: {fileID: 1734966957} + m_Layer: 0 + m_Name: BackMix + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1734966956 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734966955} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 782858429} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &1734966957 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734966955} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 1 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!1 &1815868748 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1815868749} + - component: {fileID: 1815868750} + m_Layer: 5 + m_Name: Control-Left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1815868749 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1815868748} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1699916271} + m_Father: {fileID: 739665118} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -534.98, y: -79.86484} + m_SizeDelta: {x: -1070.2, y: 159.7296} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1815868750 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1815868748} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 100 + m_Right: 0 + m_Top: 20 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1832857649 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1832857650} + - component: {fileID: 1832857651} + m_Layer: 0 + m_Name: TextMix + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1832857650 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1832857649} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 782858429} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &1832857651 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1832857649} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!1 &1944636608 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1944636609} + - component: {fileID: 1944636610} + m_Layer: 0 + m_Name: Character_Voice + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1944636609 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1944636608} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 782858429} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &1944636610 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1944636608} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!1 &2064238917 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2064238918} + - component: {fileID: 2064238921} + - component: {fileID: 2064238920} + - component: {fileID: 2064238923} + m_Layer: 5 + m_Name: ButtonReturn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2064238918 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2064238917} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 980602828} + m_Father: {fileID: 730832296} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 225.17, y: 90.338} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2064238920 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2064238917} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.8862745, b: 0.3254902, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2ef7c333dc8ea04cb18fa60f8e7e5a0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2064238921 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2064238917} + m_CullTransparentMesh: 1 +--- !u!114 &2064238923 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2064238917} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.7137255} + m_EffectDistance: {x: 2.76, y: -3.99} + m_UseGraphicAlpha: 1 +--- !u!1 &2119107101 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2119107102} + - component: {fileID: 2119107103} + m_Layer: 5 + m_Name: Img-Character + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2119107102 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2119107101} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 833643127} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 407.5479} + m_SizeDelta: {x: 0, y: 815.0958} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2119107103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2119107101} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a3dc170f98da4848a48e1bb8cc1698a, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Old version_1.0/Assets/HGF/Scenes/Demo.unity.meta b/Old version_1.0/Assets/HGF/Scenes/Demo.unity.meta new file mode 100644 index 0000000..63afb40 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scenes/Demo.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3aad7971c23b3a4bb9b1ee796d42b71 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts.meta b/Old version_1.0/Assets/HGF/Scripts.meta new file mode 100644 index 0000000..d0760e6 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e5211f5e940f29a42a987e2f71716b96 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/BGScaler.cs b/Old version_1.0/Assets/HGF/Scripts/BGScaler.cs new file mode 100644 index 0000000..b75a83a --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/BGScaler.cs @@ -0,0 +1,63 @@ +using UnityEngine; +namespace Common.UI +{ + /// + ///全屏背景图片等比例拉伸自适应 + /// + [ExecuteInEditMode] + public class BGScaler : MonoBehaviour + { + /// + /// 图片原大小(压缩前的) + /// + public Vector2 textureOriginSize = new Vector2(2048, 1024); + + private void Awake () + { + Scaler(); + } + + /// + /// 适配 + /// + private void Scaler () + { + //当前画布尺寸 + Vector2 canvasSize = gameObject.GetComponentInParent().GetComponent().sizeDelta; + //当前画布尺寸长宽比 + float screenxyRate = canvasSize.x / canvasSize.y; + + //图片尺寸 这个得到的结果是 (0,0) ? + //Vector2 bgSize = bg.mainTexture.texelSize; + Vector2 bgSize = textureOriginSize; + //视频尺寸长宽比 + float texturexyRate = bgSize.x / bgSize.y; + + RectTransform rt = (RectTransform)transform; + //视频x偏长,需要适配y(下面的判断 '>' 改为 '<' 就是视频播放器的视频方式) + if (texturexyRate > screenxyRate) + { + int newSizeY = Mathf.CeilToInt(canvasSize.y); + int newSizeX = Mathf.CeilToInt((float)newSizeY / bgSize.y * bgSize.x); + rt.sizeDelta = new Vector2(newSizeX, newSizeY); + } + else + { + int newVideoSizeX = Mathf.CeilToInt(canvasSize.x); + int newVideoSizeY = Mathf.CeilToInt((float)newVideoSizeX / bgSize.x * bgSize.y); + rt.sizeDelta = new Vector2(newVideoSizeX, newVideoSizeY); + } + } + + private void Update () + { +#if UNITY_EDITOR + //editor模式下测试用 + Scaler(); +#endif + } + + } + + +} diff --git a/Old version_1.0/Assets/HGF/Scripts/BGScaler.cs.meta b/Old version_1.0/Assets/HGF/Scripts/BGScaler.cs.meta new file mode 100644 index 0000000..b7b8d47 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/BGScaler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3508eebb8790e404d9b119c00020c8e1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame.meta new file mode 100644 index 0000000..bf9498e --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: df6ad89fd343e5743ad97bab26a958be +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalComponent_Choice.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalComponent_Choice.cs new file mode 100644 index 0000000..f7dc221 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalComponent_Choice.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace ScenesScripts.GalPlot +{ + /// + /// 选项类 + /// + public class GalComponent_Choice : MonoBehaviour + { + /// + /// 这个选项要跳转到的ID + /// + public string _JumpID; + + /// + /// 显示的文本 + /// + public Text _Title; + public void Init (string JumpID, string Title) + { + _JumpID = JumpID; + _Title.text = Title; + } + /// + /// 当玩家按下了选项 + /// + public void Button_Click_JumpTo () + { + + GalManager.PlotData.NowJumpID = _JumpID; + GalManager.PlotData.IsBranch = true; + GalManager_Text.IsCanJump = true; + if (_JumpID == "-1") + { + return; + } + this.gameObject.transform.parent.GetComponent().Button_Click_Choice(); + GameObject.Find("EventSystem").GetComponent().Button_Click_NextPlot(); + + return; + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalComponent_Choice.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalComponent_Choice.cs.meta new file mode 100644 index 0000000..fe0ea44 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalComponent_Choice.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9d70b5e7b3b9866499c01173b32732a9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager.cs new file mode 100644 index 0000000..ed69062 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager.cs @@ -0,0 +1,423 @@ +using Common.Game; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Xml.Linq; +using TetraCreations.Attributes; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.UI; +using static ScenesScripts.GalPlot.GalManager.Struct_PlotData; +namespace ScenesScripts.GalPlot +{ + public class GalManager : MonoBehaviour + { + public static string PlotID; + + [Title("当前对话")] + /// + public GalManager_Text Gal_Text; + + [Title("当前角色部分")] + public GalManager_CharacterImg Gal_CharacterImg; + + [Title("控制选项")] + public GalManager_Choice Gal_Choice; + + [Title("控制背景图片的组件")] + public GalManager_BackImg Gal_BackImg; + + + /// + /// 当前场景角色数量 + /// + [Title("当前场景角色数量")] + public int CharacterNum; + private class CharacterConfig + { + public static GameConfig CharacterInfo = new($"{GameAPI.GetWritePath()}/HGF/CharacterInfo.ini"); + public static GameConfig Department = new($"{GameAPI.GetWritePath()}/HGF/Department.ini"); + + } + public class AudioSystemModel + { + public AudioSource Character_Voice; + public AudioSource BackMix; + public AudioSource TextMix; + public class AudioInfo + { + public string name; + public string path; + } + public List AudioList = new(); + /// + /// 背景音乐Clip + /// + + } + public static AudioSystemModel AudioSystem = new(); + /// + /// 存储整个剧本的XML文档 + /// + private XDocument PlotxDoc; + [Serializable] + public class Struct_PlotData + { + public string Title; + public string Synopsis; + public List BranchPlot = new(); + public Queue BranchPlotInfo = new(); + public Queue MainPlot = new(); + public class Struct_Choice + { + public string Title; + public string JumpID; + } + public class Struct_CharacterInfo + { + public string CharacterID; + public GameObject CharacterGameObject; + public string Name; + public string Affiliation; + public string FromID; + } + public List CharacterInfo = new(); + public List ChoiceText = new(); + /// + /// 当前的剧情节点 + /// + public XElement NowPlotDataNode; + + /// + /// 当前是否为分支剧情节点 + /// + public bool IsBranch = false; + public string NowJumpID; + + } + + public static Struct_PlotData PlotData = new(); + private void Start () + { + ResetPlotData(); + StartBackAudio(); + StartCoroutine(LoadPlot()); + + return; + } + /// + /// 重置 + /// + private void ResetPlotData () + { + PlotData = new Struct_PlotData(); + return; + } + /// + /// 解析框架文本 + /// + /// + public IEnumerator LoadPlot () + { + yield return null; + + string _PlotText = string.Empty; + string filePath = Path.Combine(Application.streamingAssetsPath, "HGF/Test.xml"); + if (Application.platform == RuntimePlatform.Android) + { + filePath = "jar:file://" + Application.dataPath + "!/assets/HGF/Test.xml"; + } + UnityWebRequest www = UnityWebRequest.Get(filePath); + yield return www.SendWebRequest(); + + if (www.result == UnityWebRequest.Result.Success) + { + _PlotText = www.downloadHandler.text; + } + else + { + Debug.Log("Error: " + www.error); + } + try + { + + GameAPI.Print($"游戏剧本:{_PlotText}"); + PlotxDoc = XDocument.Parse(_PlotText); + + //-----开始读取数据 + + foreach (var item in PlotxDoc.Root.Elements()) + { + switch (item.Name.ToString()) + { + case "ID": + { + PlotID = item.Value; + break; + } + case "title": + { + PlotData.Title = item.Value; + break; + } + case "Synopsis": + { + PlotData.Synopsis = item.Value; + break; + } + case "BranchPlot": + { + foreach (var BranchItem in item.Elements()) + { + PlotData.BranchPlot.Add(BranchItem); + } + break; + } + case "AudioList": + { + foreach (var item_name in item.Elements()) + { + + AudioSystem.AudioList.Add(new AudioSystemModel.AudioInfo + { + name = item_name.Value, + path = item_name.Attribute("Path").Value, + }); + } + break; + } + case "MainPlot": + { + foreach (var MainPlotItem in item.Elements()) + { + PlotData.MainPlot.Enqueue(MainPlotItem); + } + break; + } + default: + { + throw new Exception("无法识别的根标签"); + + } + } + } + } + catch (Exception ex) + { + if (ex.Message != "无法识别的根标签") + { + + GameAPI.Print(ex.Message, "error"); + } + } + GameAPI.Print(Newtonsoft.Json.JsonConvert.SerializeObject(PlotData)); + Button_Click_NextPlot(); + } + /// + /// 点击屏幕 下一句 + /// + public void Button_Click_NextPlot () + { + + if (PlotData.MainPlot.Count == 0) + { + GameAPI.Print("游戏结束!"); + return; + } + + //IsCanJump这里有问题,如果一直点击会为false,而不是说true,这是因为没有点击按钮 ,没有添加按钮 + if (GalManager_Text.IsSpeak || !GalManager_Text.IsCanJump) { return; } + if (!PlotData.IsBranch) + { + PlotData.MainPlot.TryDequeue(out PlotData.NowPlotDataNode);//队列出队+内联 出一个temp节点 + PlotData.BranchPlotInfo.Clear(); + } + else//当前为分支节点 + { + //这块得妥善处理 + PlotData.NowPlotDataNode = GetBranchByID(PlotData.NowJumpID); + } + + PlotData.ChoiceText.Clear(); + if (PlotData.NowPlotDataNode == null) + { + GameAPI.Print("无效的剧情结点", "error"); + return; + } + switch (PlotData.NowPlotDataNode.Name.ToString()) + { + case "AddCharacter"://处理添加角色信息的东西 + { + var _ = new Struct_CharacterInfo(); + var _From = PlotData.NowPlotDataNode.Attribute("From").Value; + var _CharacterId = PlotData.NowPlotDataNode.Attribute("CharacterID").Value; + _.Name = CharacterConfig.CharacterInfo.GetValue(_From, "Name"); + _.CharacterID = _CharacterId; + _.Affiliation = CharacterConfig.Department.GetValue(CharacterConfig.CharacterInfo.GetValue(_From, "Department"), "Name"); + _.FromID = _From; + var _CameObj = Resources.Load("HGF/Img-Character"); + _CameObj.GetComponent().sprite = GameAPI.LoadTextureByIO($"{GameAPI.GetWritePath()}/HGF/Texture2D/Portrait/{CharacterConfig.CharacterInfo.GetValue(_From, "ResourcesPath")}/{CharacterConfig.CharacterInfo.GetValue(_From, "Portrait-Normall")}"); + _.CharacterGameObject = Instantiate(_CameObj, Gal_CharacterImg.gameObject.transform); + + if (PlotData.NowPlotDataNode.Attributes("SendMessage").Count() != 0) + { + _.CharacterGameObject.GetComponent().Animate_StartOrOutside = PlotData.NowPlotDataNode.Attribute("SendMessage").Value; + } + + PlotData.CharacterInfo.Add(_); + + Button_Click_NextPlot(); + break; + } + case "Speak": //处理发言 + { + var _nodeinfo = GetCharacterObjectByName(PlotData.NowPlotDataNode.Attribute("CharacterID").Value); + if (PlotData.NowPlotDataNode.Elements().Count() != 0) //有选项,因为他有子节点数目了 + { + GalManager_Text.IsCanJump = false; + foreach (var ClildItem in PlotData.NowPlotDataNode.Elements()) + { + if (ClildItem.Name.ToString() == "Choice") + PlotData.ChoiceText.Add(new Struct_Choice { Title = ClildItem.Value, JumpID = ClildItem.Attribute("JumpID").Value }); + + } + Gal_Text.StartTextContent(PlotData.NowPlotDataNode.Attribute("Content").Value, _nodeinfo.Name, _nodeinfo.Affiliation, () => + { + + foreach (var ClildItem in GalManager.PlotData.ChoiceText) + { + Gal_Choice.CreatNewChoice(ClildItem.JumpID, ClildItem.Title); + } + }); + } + else Gal_Text.StartTextContent(PlotData.NowPlotDataNode.Attribute("Content").Value, _nodeinfo.Name, _nodeinfo.Affiliation); + + //处理消息 + if (PlotData.NowPlotDataNode.Attributes("SendMessage").Count() != 0) + SendCharMessage(_nodeinfo.CharacterID, PlotData.NowPlotDataNode.Attribute("SendMessage").Value); + if (PlotData.NowPlotDataNode.Attributes("AudioPath").Count() != 0) + StartCoroutine(PlayAudio(AudioSystem.Character_Voice, PlotData.NowPlotDataNode.Attribute("AudioPath").Value)); + break; + } + case "ChangeBackImg"://更换背景图片 + { + var _Path = PlotData.NowPlotDataNode.Attribute("Path").Value; + Gal_BackImg.SetImage(GameAPI.LoadTextureByIO($"{GameAPI.GetWritePath()}/HGF/Texture2D/Back/{_Path}")); + Button_Click_NextPlot(); + break; + } + case "DeleteCharacter": + { + DestroyCharacterByID(PlotData.NowPlotDataNode.Attribute("CharacterID").Value); + break; + } + case "ChangeCharacterImg": + { + var _CharacterID = PlotData.NowPlotDataNode.Attribute("CharacterID").Value; + var _obj = GetCharacterObjectByName(_CharacterID); + + //Debug.Log(_obj.CharacterGameObject.GetComponent() is null); + + //ResourcesPath + _obj.CharacterGameObject.GetComponent().SetImage(GameAPI.LoadTextureByIO($"{GameAPI.GetWritePath()}/HGF/Texture2D/Portrait/{CharacterConfig.CharacterInfo.GetValue(_obj.FromID, "ResourcesPath")}/{CharacterConfig.CharacterInfo.GetValue(_obj.FromID, PlotData.NowPlotDataNode.Attribute("KeyName").Value)}")); + // _obj.CharacterGameObject.GetComponent().sprite = Resources.Load($"Texture2D/Menhera/Plot/character/{GameManager.ServerManager.Config.CharacterInfo.GetValue(_obj.FromID, "ResourcePath")}/{GameManager.ServerManager.Config.CharacterInfo.GetValue(_obj.FromID, PlotData.NowPlotDataNode.Attribute("Img").Value)}"); + // Debug.Log($"Texture2D/Menhera/Plot/character/{GameManager.ServerManager.Config.CharacterInfo.GetValue(_obj.FromID, "ResourcePath")}/{GameManager.ServerManager.Config.CharacterInfo.GetValue(_obj.FromID, PlotData.NowPlotDataNode.Attribute("Img").Value)}"); + Button_Click_NextPlot(); + break; + } + case "ChangeBackAudio": + { + PlayAudio(AudioSystem.BackMix, AudioSystem.AudioList.Find(e => e.name == PlotData.NowPlotDataNode.Value).path); + Button_Click_NextPlot(); + break; + } + case "ExitGame": + { + foreach (var item in PlotData.CharacterInfo) + { + DestroyCharacterByID(item.CharacterID); + } + PlotData.MainPlot.Clear(); + PlotData.BranchPlot.Clear(); + PlotData.IsBranch = false; + break; + } + } + if (PlotData.BranchPlotInfo.Count == 0) + { + PlotData.IsBranch = false; + } + return; + } + public void Button_Click_FastMode () + { + GalManager_Text.IsFastMode = true; + return; + } + public Struct_CharacterInfo GetCharacterObjectByName (string ID) + { + return PlotData.CharacterInfo.Find(t => t.CharacterID == ID); + } + public XElement GetBranchByID (string ID) + { + if (PlotData.BranchPlotInfo.Count == 0) + foreach (var item in PlotData.BranchPlot.Find(t => t.Attribute("ID").Value == ID).Elements()) + { + PlotData.BranchPlotInfo.Enqueue(item); + + } + PlotData.BranchPlotInfo.TryDequeue(out XElement t); + return t; + } + /// + /// 销毁一个角色 + /// + /// + public void DestroyCharacterByID (string ID) + { + var _ = PlotData.CharacterInfo.Find(t => t.CharacterID == ID); + SendCharMessage(ID, "Quit"); + PlotData.CharacterInfo.Remove(_); + } + public void SendCharMessage (string CharacterID, string Message) + { + var _t = GetCharacterObjectByName(CharacterID); + _t.CharacterGameObject.GetComponent().HandleMessage(Message); + } + private IEnumerator PlayAudio (AudioSource audioSource, string fileName) + { + //获取.wav文件,并转成AudioClip + GameAPI.Print($"{GameAPI.GetWritePath()}/{fileName}"); + UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip($"{GameAPI.GetWritePath()}/HGF/Audio/Plot/{PlotID}/{fileName}", AudioType.MPEG); + //等待转换完成 + yield return www.SendWebRequest(); + //获取AudioClip + AudioClip audioClip = DownloadHandlerAudioClip.GetContent(www); + //设置当前AudioSource组件的AudioClip + audioSource.clip = audioClip; + //播放声音 + audioSource.Play(); + } + /// + /// 初始化音乐系统 + /// + private void StartBackAudio () + { + AudioSystem.Character_Voice = GameObject.Find("AudioSystem/Character_Voice").GetComponent(); + AudioSystem.BackMix = GameObject.Find("AudioSystem/BackMix").GetComponent(); + AudioSystem.TextMix = GameObject.Find("AudioSystem/TextMix").GetComponent(); + + } + + private void FixedUpdate () + { + CharacterNum = PlotData.CharacterInfo.Count; + } + private void Update () + { + + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager.cs.meta new file mode 100644 index 0000000..ea71caf --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4187ce6bb31fd5443a2e7eb384144de7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_BackImg.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_BackImg.cs new file mode 100644 index 0000000..845852a --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_BackImg.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace ScenesScripts.GalPlot +{ + + public class GalManager_BackImg : MonoBehaviour + { + private Image BackImg; + private void Start () + { + BackImg = this.gameObject.GetComponent(); + + } + /// + /// 直接传递图片 + /// + /// + public void SetImage (Sprite ImgSprite) + { + BackImg.sprite = ImgSprite; + } + /// + /// 从Resources资源文件夹读图片 + /// + /// + public void SetImage (string ImgSpriteFilePath) + { + BackImg.sprite = Resources.Load(ImgSpriteFilePath); + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_BackImg.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_BackImg.cs.meta new file mode 100644 index 0000000..1943dd8 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_BackImg.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae12d1bbe863d1b41a47672fd1c49d9e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterAnimate.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterAnimate.cs new file mode 100644 index 0000000..4a58773 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterAnimate.cs @@ -0,0 +1,188 @@ + +using Common.Game; +using DG.Tweening; +using TetraCreations.Attributes; +using UnityCustom; +using UnityEngine; +using UnityEngine.UI; + +namespace ScenesScripts.GalPlot +{ + public class GalManager_CharacterAnimate : MonoBehaviour + { + /// + /// 出入场出场动画 + /// + [StringInList("ToShow", "Outside-ToLeft", "Outside-ToRight")] public string Animate_StartOrOutside = "ToShow"; + /// + /// 动画 + /// Shake:颤抖 + /// Shake-Y-Once:向下抖动一次 + /// ToGrey:变灰 + /// To - :不解释了,移动到指定位置 + /// + [StringInList("Shake", "Shake-Y-Once", "ToLeft", "ToCenter", "ToRight")] public string Animate_type = "Shake"; + /// + /// 角色立绘 + /// + private Image CharacterImg; + [Title("注意,主画布的名称必须是MainCanvas")] + public Canvas MainCanvas; + private void Awake () + { + CharacterImg = this.gameObject.GetComponent(); + if (MainCanvas == null) MainCanvas = GameObject.Find("MainCanvas").GetComponent(); + } + [Button(nameof(Start), "重新执行入场动画")] + private void Start () + { + HandleInOrOutsideMessgae(Animate_StartOrOutside); + + } + [Button(nameof(Start), "重新执行及时动画")] + public void HandleMessgae () + { + var _rect = CharacterImg.GetComponent(); + switch (Animate_type) + { + case "Shake": + { + _rect.DOShakePosition(0.5f, 30f); + break; + } + case "Shake-Y-Once": + { + _rect.DOAnchorPosY(_rect.anchoredPosition.y - 50f, 0.6f).OnComplete(() => + { + _rect.DOAnchorPosY(_rect.anchoredPosition.y + 50f, 0.6f); + }); + break; + } + case "ToLeft": + { + DOTween.To(() => _rect.anchoredPosition, x => _rect.GetComponent().anchoredPosition = x, PositionImageInside(_rect, -1), 1f); + break; + } + case "ToCenter": + { + DOTween.To(() => _rect.anchoredPosition, x => _rect.GetComponent().anchoredPosition = x, PositionImageInside(_rect, 0), 0.8f); + break; + } + case "ToRight": + { + DOTween.To(() => _rect.anchoredPosition, x => _rect.GetComponent().anchoredPosition = x, PositionImageInside(_rect, 1), 1f); + break; + } + case "Quit": + { + CharacterImg.DOFade(0, 0.7f).OnComplete(() => + { + Destroy(this.gameObject); + }); + break; + } + default: + { + GameAPI.Print("当前剧情文本受损,请重新安装游戏尝试", "error"); + break; + } + } + } + /// + /// 处理出场动画消息 + /// + /// + public void HandleInOrOutsideMessgae (string Messgae) + { + + CharacterImg.color = new Color32(255, 255, 255, 0);//完全透明 + var rect = this.gameObject.GetComponent(); + switch (Messgae) + { + + //逐渐显示 + case "ToShow": + { + + PositionImageOutside(this.gameObject.GetComponent(), 0); + break; + } + //从屏幕边缘滑到左侧 + case "Outside-ToLeft": + { + + PositionImageOutside(this.gameObject.GetComponent(), -1); + DOTween.To(() => rect.anchoredPosition, x => rect.GetComponent().anchoredPosition = x, new Vector2(rect.anchoredPosition.x + CharacterImg.sprite.texture.width, rect.anchoredPosition.y), 1f); + break; + } + //从屏幕边缘滑到右侧 + case "Outside-ToRight": + { + PositionImageOutside(this.gameObject.GetComponent(), 1); + DOTween.To(() => rect.anchoredPosition, x => rect.GetComponent().anchoredPosition = x, new Vector2(rect.anchoredPosition.x - CharacterImg.sprite.texture.width, rect.anchoredPosition.y), 1f); + break; + } + default: + { + GameAPI.Print("当前剧情文本受损,请重新安装游戏尝试", "error"); + break; + } + + } + //都需要指定的 + { + CharacterImg.DOFade(1, 0.7f); + } + } + /// + /// 设置image的位置到屏幕之外 + /// + /// + /// -1:左侧 0:中间 1:右侧 + private void PositionImageOutside (RectTransform ImageGameObject, int Position) + { + // 获取Image的Rect Transform + switch (Position) + { + case -1: + this.gameObject.GetComponent().anchoredPosition = new Vector2((-MainCanvas.GetComponent().sizeDelta.x / 2) - (ImageGameObject.gameObject.GetComponent().sprite.texture.width / 2), ImageGameObject.anchoredPosition.y); + break; + case 1: + this.gameObject.GetComponent().anchoredPosition = new Vector2((MainCanvas.GetComponent().sizeDelta.x / 2) + (ImageGameObject.gameObject.GetComponent().sprite.texture.width / 2), ImageGameObject.anchoredPosition.y); + break; + case 0: + this.gameObject.GetComponent().anchoredPosition = new Vector2(0, ImageGameObject.anchoredPosition.y); + break; + default: break; + } + } + /// + /// 获取image的位置到屏幕之内的位置 + /// + /// + /// -1:左侧 0:中间 1:右侧 + private Vector2 PositionImageInside (RectTransform ImageGameObject, int Position) + { + // 获取Image的Rect Transform + + switch (Position) + { + case -1: + return new Vector2((-MainCanvas.GetComponent().sizeDelta.x / 2) + (ImageGameObject.gameObject.GetComponent().sprite.texture.width / 2), ImageGameObject.anchoredPosition.y); + + case 1: + return new Vector2((MainCanvas.GetComponent().sizeDelta.x / 2) - (ImageGameObject.gameObject.GetComponent().sprite.texture.width / 2), ImageGameObject.anchoredPosition.y); + + case 0: + return new Vector2(0, ImageGameObject.anchoredPosition.y); + + default: + { + GameAPI.Print("当前剧情文本受损,请重新安装游戏尝试", "error"); + return new Vector2(0, 0); + } + } + } + } + +} diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterAnimate.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterAnimate.cs.meta new file mode 100644 index 0000000..dfa2138 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterAnimate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54b43f7a21b91734699b948fa62c4456 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterImg.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterImg.cs new file mode 100644 index 0000000..c8a9063 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterImg.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace ScenesScripts.GalPlot +{ + + public class GalManager_CharacterImg : MonoBehaviour + { + private Image CharacterImg; + private void Start () + { + CharacterImg = this.gameObject.GetComponent(); + + } + /// + /// 直接传递图片 + /// + /// + public void SetImage (Sprite ImgSprite) + { + CharacterImg.sprite = ImgSprite; + } + /// + /// 从Resources资源文件夹读图片 + /// + /// + public void SetImage (string ImgSpriteFilePath) + { + CharacterImg.sprite = Resources.Load(ImgSpriteFilePath); + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterImg.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterImg.cs.meta new file mode 100644 index 0000000..cbfe76b --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterImg.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a3dc170f98da4848a48e1bb8cc1698a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterMessage.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterMessage.cs new file mode 100644 index 0000000..c7072f5 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterMessage.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace ScenesScripts.GalPlot +{ + + public class GalManager_CharacterMessage : MonoBehaviour + { + [SerializeField] + public GalManager_CharacterAnimate Gal_CharacterAnimate; + public void HandleMessage (string MessageContent) + { + + Gal_CharacterAnimate.Animate_type = MessageContent; + Gal_CharacterAnimate.HandleMessgae(); + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterMessage.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterMessage.cs.meta new file mode 100644 index 0000000..0fd4985 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_CharacterMessage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 33a5795aa795b1046919e1869c8d65c3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Choice.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Choice.cs new file mode 100644 index 0000000..2222edd --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Choice.cs @@ -0,0 +1,35 @@ +using UnityEngine; + +namespace ScenesScripts.GalPlot +{ + public class GalManager_Choice : MonoBehaviour + { + private GameObject GameObject_Choice; + + private void Start () + { + GameObject_Choice = Resources.Load("HGF/Button-Choice"); + } + [SerializeField] + public void CreatNewChoice (string JumpID, string Title) + { + + var _ = GameObject_Choice; + _.GetComponent().Init(JumpID, Title); + Instantiate(_, this.transform); + return; + } + public void Button_Click_Choice () + { + + + for (int i = 0; i < this.transform.childCount; i++) + { + //不可用DestroyImmediate + //原因:DestroyImmediate是同步的,如果使用则会导致每次获取的都是0,无法删除, + Destroy(this.transform.GetChild(i).gameObject); + } + return; + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Choice.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Choice.cs.meta new file mode 100644 index 0000000..6f5447c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Choice.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b881bc00d6924c94e9caaeb957f23cde +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Text.cs b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Text.cs new file mode 100644 index 0000000..8b0913f --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Text.cs @@ -0,0 +1,117 @@ +using DG.Tweening; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.UI; + +namespace ScenesScripts.GalPlot +{ + public class GalManager_Text : MonoBehaviour + { + public const float DefaultSpeed = 0.045f; + public const float FastSpeed = 0.02f; + /// + /// 当前是否剧情加速 + /// + public static bool IsFastMode; + + /// + /// 当前是否正在发言 + /// 如果为假则可以开始下一句 + /// 当这个文本快结束的时候也为True + /// + public static bool IsSpeak; + + /// + /// 文本内容打字机动画事件 + /// + public static Tweener TextAnimateEvemt; + + /// + /// 文本内容 + /// + public Text Text_TextContent; + + /// + /// 发言人 + /// + public Text Text_CharacterName; + + /// + ///是否可以跳过 + /// + public static bool IsCanJump = true; + + /// + /// 对话框右下角的下一句提示 + /// + public GameObject Button_Next; + + /// + /// 对话框是否可见 + /// + public void SetDialogHide (bool value = false) + { + this.gameObject.SetActive(value); + + } + /// + /// 设置对话内容 + /// + /// + public void SetText_Content (string TextContent) + { + Text_TextContent.text = TextContent; + } + /// + /// 设置发言人的名称 + /// + public void SetText_CharacterName (string CharacterName, string CharacterIdentity) + { + + Text_CharacterName.text = $"{CharacterName} {CharacterIdentity}"; + } + /// + /// 开始发言 + /// + /// 文本内容 + /// 发言人名称 + /// 发言人所属 + /// 回调事件 + /// + public Tweener StartTextContent (string TextContent, string CharacterName, string CharacterIdentity, UnityAction CallBack = null) + { + //100 60 40 + void Always_Temp () + { + + SetText_CharacterName(CharacterName, CharacterIdentity); + + } + if (IsSpeak && Text_TextContent.text.Length >= TextContent.Length * 0.75f && IsCanJump)//当前还正在发言 + { + //但是 ,如果当前到了总文本的三分之二,也可以下一句 + SetText_Content(TextContent); + IsSpeak = false; + TextAnimateEvemt.Kill(); + Button_Next.SetActive(true); + Always_Temp(); + return TextAnimateEvemt; + } + else if (IsSpeak) return TextAnimateEvemt; + IsSpeak = true; + SetText_Content(string.Empty);//先清空内容 + Button_Next.SetActive(false); + Always_Temp(); + TextAnimateEvemt = Text_TextContent.DOText(TextContent, TextContent.Length * (IsFastMode ? FastSpeed : DefaultSpeed)).SetEase(Ease.Linear).OnComplete(() => + { + + IsSpeak = false; + CallBack?.Invoke(); + Button_Next.SetActive(true); + }); + return TextAnimateEvemt; + + } + + } +} diff --git a/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Text.cs.meta b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Text.cs.meta new file mode 100644 index 0000000..798701d --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/Galgame/GalManager_Text.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: be1c5720203259149a471ba8c12d2566 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/GameAPI.cs b/Old version_1.0/Assets/HGF/Scripts/GameAPI.cs new file mode 100644 index 0000000..e521340 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/GameAPI.cs @@ -0,0 +1,156 @@ +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using UnityEngine; +using UnityEngine.Networking; + +namespace Common.Game +{ + /// + /// 游戏内通用API + /// + public static class GameAPI + { + /// + /// 返回可读可写路径 + /// PC端:streamingAssetsPath + /// 移动端:Application.persistentDataPath + /// + /// + public static string GetWritePath () + { +#if UNITY_EDITOR || UNITY_STANDALONE + return Application.streamingAssetsPath; +#elif UNITY_IOS || UNITY_ANDROID + return Application.persistentDataPath; +#endif + } + /// + /// 接管Debug.Log(...) + /// + /// 调试信息 + /// 1.debug 2.warn 3.error + public static void Print (object _Message, string _Type = "debug") + { + string currentTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + string res = $"[{currentTime}] {_Type} : {_Message}"; + switch (_Type) + { + case "debug": + Debug.Log(res); + return; + case "warn": + Debug.LogWarning(res); + return; + case "error": + Debug.LogError(res); + return; + default: + Debug.Log(res); + break; + } + } + /// + /// 暴力查找一个物体,找不到返回Null + /// + /// + /// + public static GameObject FindGameObject_Force (string _Name) + { + + GameObject[] all = Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]; + for (int i = 0; i < all.Length; i++) + { + var item = all[i]; + if (item.name == _Name) return item; + } + return null; + + } + /// + /// 生成SHA256值 + /// + /// + /// + public static string GenerateSha256 (string input) + { + using (SHA256 sha256Hash = SHA256.Create()) + { + byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(input)); + + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < bytes.Length; i++) + { + builder.Append(bytes[i].ToString("x2")); + } + + return builder.ToString().ToUpper(); + } + } + /// + /// 通过UnityWebRequest获取本地StreamingAssets文件夹中的文件 + /// + /// 文件名称 + /// + public static string UnityWebRequestFile (string fileName) + { + string url; + #region 分平台判断 StreamingAssets 路径 + //如果在编译器或者单机中 +#if UNITY_EDITOR || UNITY_STANDALONE + + url = "file://" + Application.dataPath + "/StreamingAssets/" + fileName; + //否则如果在Iphone下 +#elif UNITY_IPHONE + url = "file://" + Application.dataPath + "/Raw/"+ fileName; + //否则如果在android下 +#elif UNITY_ANDROID + url = "jar:file://" + Application.dataPath + "!/assets/"+ fileName; +#endif + #endregion + UnityWebRequest request = UnityWebRequest.Get(url); + request.SendWebRequest();//读取数据 + while (true) + { + if (request.downloadHandler.isDone)//是否读取完数据 + { + return request.downloadHandler.text; + } + } + } + /// + /// 从外部指定文件中加载图片 + /// + /// + public static Sprite LoadTextureByIO (string Path) + { + FileStream fs = new FileStream(Path, FileMode.Open, FileAccess.Read); + fs.Seek(0, SeekOrigin.Begin);//游标的操作,可有可无 + byte[] bytes = new byte[fs.Length];//生命字节,用来存储读取到的图片字节 + try + { + fs.Read(bytes, 0, bytes.Length);//开始读取,这里最好用trycatch语句,防止读取失败报错 + + } + catch (Exception e) + { + Debug.Log(e); + } + fs.Close();//切记关闭 + + int width = 2048;//图片的宽(这里两个参数可以提到方法参数中) + int height = 2048;//图片的高(这里说个题外话,pico相关的开发,这里不能大于4k×4k不然会显示异常,当时开发pico的时候应为这个问题找了大半天原因,因为美术给的图是6000*3600,导致出现切几张图后就黑屏了。。。 + Texture2D texture = new Texture2D(width, height); + if (texture.LoadImage(bytes)) + { + return Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));//将生成的texture2d返回,到这里就得到了外部的图片,可以使用了 + } + else + { + return null; + } + } + + } +} diff --git a/Old version_1.0/Assets/HGF/Scripts/GameAPI.cs.meta b/Old version_1.0/Assets/HGF/Scripts/GameAPI.cs.meta new file mode 100644 index 0000000..3192dfb --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/GameAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc889f71cb222774084ea6092c6534d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/GameConfig.cs b/Old version_1.0/Assets/HGF/Scripts/GameConfig.cs new file mode 100644 index 0000000..399f11c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/GameConfig.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections; +using System.IO; + +namespace Common.Game +{ + /// + /// 游戏配置文件的读取,使用INI + /// + public class GameConfig + { + private Hashtable keyPairs = new Hashtable(); + private string iniFilePath; + private struct SectionPair + { + public string Section; + public string Key; + } + /// + /// 在给定的路径上打开INI文件并枚举IniParser中的值。 + /// + /// Full path to INI file. + public GameConfig (string iniPath) + { + TextReader iniFile = null; + string strLine = null; + string currentRoot = null; + string[] keyPair = null; + iniFilePath = iniPath; + if (File.Exists(iniPath)) + { + try + { + iniFile = new StreamReader(iniPath); + strLine = iniFile.ReadLine(); + while (strLine != null) + { + strLine = strLine.Trim(); + if (strLine != "") + { + if (strLine.StartsWith("[") && strLine.EndsWith("]")) + { + currentRoot = strLine.Substring(1, strLine.Length - 2); + } + else + { + keyPair = strLine.Split(new char[] { '=' }, 2); + SectionPair sectionPair; + String value = null; + if (currentRoot == null) + currentRoot = "ROOT"; + sectionPair.Section = currentRoot; + sectionPair.Key = keyPair[0]; + if (keyPair.Length > 1) + value = keyPair[1]; + keyPairs.Add(sectionPair, value); + } + } + strLine = iniFile.ReadLine(); + } + } + catch (Exception ex) + { + throw ex; + } + finally + { + if (iniFile != null) + iniFile.Close(); + } + } + else + { + GameAPI.Print("找不到INI配置,已自动创建", "warn"); + Save(); + } + } + + /// + /// 返回给定section的值,key对。 + /// + /// Section name + /// Key name + public string GetValue (string sectionName, string settingName) + { + SectionPair sectionPair; + sectionPair.Section = sectionName; + sectionPair.Key = settingName; + return (string)keyPairs[sectionPair]; + } + /// + /// 列出给定的Section的所有行 + /// + /// Section to enum. + public string[] EnumSection (string sectionName) + { + ArrayList tmpArray = new ArrayList(); + foreach (SectionPair pair in keyPairs.Keys) + { + if (pair.Section == sectionName) + tmpArray.Add(pair.Key); + } + return (string[])tmpArray.ToArray(typeof(string)); + } + /// + /// 向要保存的节添加或替换Value。 + /// + /// Section to add under. + /// Key name to add. + /// Value of key. + public void SetValue (string sectionName, string settingName, string settingValue) + { + SectionPair sectionPair; + sectionPair.Section = sectionName; + sectionPair.Key = settingName; + if (keyPairs.ContainsKey(sectionPair)) + keyPairs.Remove(sectionPair); + keyPairs.Add(sectionPair, settingValue); + Save(); + + } + /// + /// 删除设置 + /// + /// 指定Section + /// 添加的Key + public void Delete (string sectionName, string settingName) + { + SectionPair sectionPair; + sectionPair.Section = sectionName; + sectionPair.Key = settingName; + if (keyPairs.ContainsKey(sectionPair)) + keyPairs.Remove(sectionPair); + Save(); + } + /// + /// 保存到新文件。 + /// + /// 新的文件路径。 + public void SaveSettings (string newFilePath) + { + ArrayList sections = new ArrayList(); + string tmpValue = ""; + string strToSave = ""; + foreach (SectionPair sectionPair in keyPairs.Keys) + { + if (!sections.Contains(sectionPair.Section)) + sections.Add(sectionPair.Section); + } + foreach (string section in sections) + { + strToSave += ("[" + section + "]\r\n"); + foreach (SectionPair sectionPair in keyPairs.Keys) + { + if (sectionPair.Section == section) + { + tmpValue = (string)keyPairs[sectionPair]; + if (tmpValue != null) + tmpValue = "=" + tmpValue; + strToSave += (sectionPair.Key + tmpValue + "\r\n"); + } + } + strToSave += "\r\n"; + } + try + { + TextWriter tw = new StreamWriter(newFilePath); + tw.Write(strToSave); + tw.Close(); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 将设置保存回ini文件。 + /// + public void Save () + { + SaveSettings(iniFilePath); + } + + public static string GetValue (string Path, string SectionName, string settingName) + { + var _ = new GameConfig(Path); + return _.GetValue(SectionName, settingName); + } + } +} diff --git a/Old version_1.0/Assets/HGF/Scripts/GameConfig.cs.meta b/Old version_1.0/Assets/HGF/Scripts/GameConfig.cs.meta new file mode 100644 index 0000000..58ee610 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/GameConfig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 60a53357b897c2a439d56a47f6d762dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/StringInList.cs b/Old version_1.0/Assets/HGF/Scripts/StringInList.cs new file mode 100644 index 0000000..65be3bd --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/StringInList.cs @@ -0,0 +1,125 @@ +using System; + +using UnityEngine; + +#if UNITY_EDITOR + +using UnityEditor; + +#endif + +namespace UnityCustom +{ + public class StringInList : PropertyAttribute + + { + + public delegate string[] GetStringList (); + + + + public StringInList (params string[] list) + + { + + List = list; + + } + + + + public StringInList (Type type, string methodName) + + { + + var method = type.GetMethod(methodName); + + if (method != null) + + { + + List = method.Invoke(null, null) as string[]; + + } + + else + + { + + Debug.LogError("NO SUCH METHOD " + methodName + " FOR " + type); + + } + + } + + + + public string[] List + + { + + get; + + private set; + + } + + } + + + +#if UNITY_EDITOR + + [CustomPropertyDrawer(typeof(StringInList))] + + public class StringInListDrawer : PropertyDrawer + + { + + // Draw the property inside the given rect + + public override void OnGUI (Rect position, SerializedProperty property, GUIContent label) + + { + + var stringInList = attribute as StringInList; + + var list = stringInList.List; + + if (property.propertyType == SerializedPropertyType.String) + + { + + int index = Mathf.Max(0, Array.IndexOf(list, property.stringValue)); + + index = EditorGUI.Popup(position, property.displayName, index, list); + + + + property.stringValue = list[index]; + + } + + else if (property.propertyType == SerializedPropertyType.Integer) + + { + + property.intValue = EditorGUI.Popup(position, property.displayName, property.intValue, list); + + } + + else + + { + + base.OnGUI(position, property, label); + + } + + } + + } + +#endif + +} diff --git a/Old version_1.0/Assets/HGF/Scripts/StringInList.cs.meta b/Old version_1.0/Assets/HGF/Scripts/StringInList.cs.meta new file mode 100644 index 0000000..6818376 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/StringInList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 69e0aabd822d876489d488841d8d00f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Scripts/ZoomImage.cs b/Old version_1.0/Assets/HGF/Scripts/ZoomImage.cs new file mode 100644 index 0000000..3053312 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/ZoomImage.cs @@ -0,0 +1,42 @@ +using TetraCreations.Attributes; +using UnityEngine; +using UnityEngine.UI; + +namespace Common.UI +{ + /// + /// 图片按比例缩放 + /// + public class ZoomImage : MonoBehaviour + { + private Image _Image; + private AspectRatioFitter _AspectRatioFitter; + private Sprite lastSprite; + private void Start () + { + + _Image = GetComponent(); + _AspectRatioFitter = GetComponent(); + if (_AspectRatioFitter == null) _AspectRatioFitter = this.gameObject.AddComponent(); + _AspectRatioFitter.aspectMode = AspectRatioFitter.AspectMode.HeightControlsWidth; + lastSprite = _Image.sprite; + RedsizeImage(); + } + private void Update () + { + if (Application.isPlaying && lastSprite != _Image.sprite) + { + lastSprite = _Image.sprite; + RedsizeImage(); + } + } + [Button(nameof(RedsizeImage), "重新设置比例")] + public void RedsizeImage () + { + if (GetComponent().sprite == null) return; + _AspectRatioFitter.aspectRatio = _Image.sprite.texture.width / (float)_Image.sprite.texture.height; + } + + } + +} diff --git a/Old version_1.0/Assets/HGF/Scripts/ZoomImage.cs.meta b/Old version_1.0/Assets/HGF/Scripts/ZoomImage.cs.meta new file mode 100644 index 0000000..fe89c2d --- /dev/null +++ b/Old version_1.0/Assets/HGF/Scripts/ZoomImage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4faea60de30008b438af4d2c1d1bad64 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes.meta b/Old version_1.0/Assets/HGF/Tetra Attributes.meta new file mode 100644 index 0000000..f670b21 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0cc1aa810ec32df46bc3845fd378cdd4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core.meta new file mode 100644 index 0000000..9e1dc77 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 082e69b70cfa506439749423e5025ff8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ButtonAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ButtonAttribute.cs new file mode 100644 index 0000000..ea6b33d --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ButtonAttribute.cs @@ -0,0 +1,23 @@ +using System; + +namespace TetraCreations.Attributes +{ + [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)] + public class ButtonAttribute : Attribute + { + public string MethodName { get; private set; } + public string Label { get; private set; } + public int Space { get; private set; } + public string Row { get; private set; } + public bool HasRow { get; private set; } + + public ButtonAttribute(string methodName, string label = "", float width = default, int space = default, string row = default) + { + MethodName = methodName; + Label = label; + Space = space; + Row = row; + HasRow = !string.IsNullOrEmpty(Row); + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ButtonAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ButtonAttribute.cs.meta new file mode 100644 index 0000000..917dd32 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ButtonAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bc3dd7092e440e46947dad5644e0254 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ColorExtensions.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ColorExtensions.cs new file mode 100644 index 0000000..61c0710 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ColorExtensions.cs @@ -0,0 +1,47 @@ +using UnityEngine; + +namespace TetraCreations.Attributes +{ + public static class ColorExtensions + { + // Convert the TitleColor enum to an actual Color32 + public static Color32 ToColor(this CustomColor color) + { + switch (color) + { + case CustomColor.Aqua: return new Color32(127, 219, 255, 255); + case CustomColor.Beige: return new Color32(245, 245, 220, 255); + case CustomColor.Black: return new Color32(0, 0, 0, 255); + case CustomColor.Blue: return new Color32(31, 133, 221, 255); + case CustomColor.BlueVariant: return new Color32(67, 110, 238, 255); + case CustomColor.DarkBlue: return new Color32(41, 41, 225, 255); + case CustomColor.Bright: return new Color32(196, 196, 196, 255); + case CustomColor.Brown: return new Color32(148, 96, 59, 255); + case CustomColor.Cyan: return new Color32(0, 255, 255, 255); + case CustomColor.DarkGray: return new Color32(36, 36, 36, 255); + case CustomColor.Fuchsia: return new Color32(240, 18, 190, 255); + case CustomColor.Gray: return new Color32(88, 88, 88, 255); + case CustomColor.Green: return new Color32(98, 200, 79, 255); + case CustomColor.Indigo: return new Color32(75, 0, 130, 255); + case CustomColor.LightGray: return new Color32(128, 128, 128, 255); + case CustomColor.Lime: return new Color32(1, 255, 112, 255); + case CustomColor.Navy: return new Color32(15, 35, 86, 255); + case CustomColor.Olive: return new Color32(61, 153, 112, 255); + case CustomColor.DarkOlive: return new Color32(47, 79, 79, 255); + case CustomColor.Orange: return new Color32(255, 128, 0, 255); + case CustomColor.OrangeVariant: return new Color32(255, 135, 62, 255); + case CustomColor.Pink: return new Color32(255, 152, 203, 255); + case CustomColor.Red: return new Color32(234, 42, 42, 255); + case CustomColor.LightRed: return new Color32(217, 71, 71, 255); + case CustomColor.RedVariant: return new Color32(232, 10, 10, 255); + case CustomColor.DarkRed: return new Color32(144, 20, 39, 255); + case CustomColor.Tan: return new Color32(210, 180, 140, 255); + case CustomColor.Teal: return new Color32(27, 126, 126, 255); + case CustomColor.Violet: return new Color32(181, 93, 237, 255); + case CustomColor.White: return new Color32(255, 255, 255, 255); + case CustomColor.Yellow: return new Color32(255, 211, 0, 255); + default: return new Color32(0, 0, 0, 0); + } + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ColorExtensions.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ColorExtensions.cs.meta new file mode 100644 index 0000000..c907f6a --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ColorExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c57a986808564b7478b4b7733a65d9bc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/DrawIfAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/DrawIfAttribute.cs new file mode 100644 index 0000000..bbdb3ba --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/DrawIfAttribute.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using System; + +namespace TetraCreations.Attributes +{ + /// + /// Draws the field/property ONLY if the compared property compared by the comparison type with the value of comparedValue returns true. + /// Based on: https://forum.unity.com/threads/draw-a-field-only-if-a-condition-is-met.448855/ + /// + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)] + public class DrawIfAttribute : PropertyAttribute + { + #region Fields + public string ComparedPropertyName { get; private set; } + public object ComparedValue { get; private set; } + public DisablingType DisablingType { get; private set; } + + #endregion + + /// + /// Only draws the field if the condition is true.

+ /// Supports Boolean and Enum. + ///
+ /// The name of the property that is being compared (case sensitive). + /// The value the property is being compared to. + /// Determine if it will hide the field or make it read only if the condition is NOT met. + /// Defaulted to DisablingType.DontDraw. + public DrawIfAttribute(string comparedPropertyName, object comparedValue, DisablingType disablingType = DisablingType.DontDraw) + { + ComparedPropertyName = comparedPropertyName; + ComparedValue = comparedValue; + DisablingType = disablingType; + } + } + + /// + /// Types of comperisons. + /// + public enum DisablingType + { + ReadOnly = 2, + DontDraw = 3 + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/DrawIfAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/DrawIfAttribute.cs.meta new file mode 100644 index 0000000..0f65e2f --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/DrawIfAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ac0c4fbed039c0541b44ed5592ddc44a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum.meta new file mode 100644 index 0000000..d22a269 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 10946b7935516c447932e75b5f6995cc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum/CustomColor.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum/CustomColor.cs new file mode 100644 index 0000000..18c715f --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum/CustomColor.cs @@ -0,0 +1,38 @@ +// This is used to colorize the TitleAttribute +namespace TetraCreations.Attributes +{ + public enum CustomColor + { + Aqua, + Beige, + Black, + Blue, + BlueVariant, + DarkBlue, + Bright, + Brown, + Cyan, + DarkGray, + Fuchsia, + Gray, + Green, + Indigo, + LightGray, + Lime, + Navy, + Olive, + DarkOlive, + Orange, + OrangeVariant, + Pink, + Red, + LightRed, + RedVariant, + DarkRed, + Tan, + Teal, + Violet, + White, + Yellow + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum/CustomColor.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum/CustomColor.cs.meta new file mode 100644 index 0000000..f8570c6 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/Enum/CustomColor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 860072ac14442604797efc9859df4229 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/HelpBoxAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/HelpBoxAttribute.cs new file mode 100644 index 0000000..af63e2e --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/HelpBoxAttribute.cs @@ -0,0 +1,24 @@ +using System; +using UnityEngine; + +namespace TetraCreations.Attributes +{ + public enum HelpBoxMessageType { None, Info, Warning, Error } + + [AttributeUsage(AttributeTargets.Field, Inherited = true)] + public class HelpBoxAttribute : PropertyAttribute + { + public string Text { get; private set; } + public HelpBoxMessageType MessageType { get; private set; } + public float MinimumHeight { get; private set; } + public int FontSize { get; private set; } + + public HelpBoxAttribute(string text, HelpBoxMessageType messageType = HelpBoxMessageType.None, float minimumHeight = 20, int fontSize = 12) + { + Text = text; + MessageType = messageType; + MinimumHeight = minimumHeight; + FontSize = fontSize; + } + } +} diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/HelpBoxAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/HelpBoxAttribute.cs.meta new file mode 100644 index 0000000..380c935 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/HelpBoxAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7a4ffb9c14ebc594d99fe2b89da197ca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/MinMaxSliderAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/MinMaxSliderAttribute.cs new file mode 100644 index 0000000..cff121b --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/MinMaxSliderAttribute.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +namespace TetraCreations.Attributes +{ + public class MinMaxSliderAttribute : PropertyAttribute + { + public float Min { get; private set; } + public float Max { get; private set; } + + public MinMaxSliderAttribute(float min, float max) + { + Min = min; + Max = max; + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/MinMaxSliderAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/MinMaxSliderAttribute.cs.meta new file mode 100644 index 0000000..39a263f --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/MinMaxSliderAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a1fadfa06e2c45e46b6012ae4446acc5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/PathReference.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/PathReference.cs new file mode 100644 index 0000000..e2c1586 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/PathReference.cs @@ -0,0 +1,16 @@ +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace TetraCreations.Attributes +{ + [System.Serializable] + public class PathReference + { + public string GUI; + + #if UNITY_EDITOR + public string Path => AssetDatabase.GUIDToAssetPath(GUI); + #endif + } +} diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/PathReference.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/PathReference.cs.meta new file mode 100644 index 0000000..f12afd8 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/PathReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d77aa39161ef7bd449643862d77704ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ReadOnlyAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ReadOnlyAttribute.cs new file mode 100644 index 0000000..3f1aaca --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ReadOnlyAttribute.cs @@ -0,0 +1,10 @@ +using System; +using UnityEngine; + +namespace TetraCreations.Attributes +{ + [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)] + public class ReadOnlyAttribute : PropertyAttribute + { + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ReadOnlyAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ReadOnlyAttribute.cs.meta new file mode 100644 index 0000000..195ca30 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/ReadOnlyAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b173128c26c4c54ab83bb6c9168df07 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/RequiredAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/RequiredAttribute.cs new file mode 100644 index 0000000..5db1470 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/RequiredAttribute.cs @@ -0,0 +1,11 @@ +using System; +using UnityEngine; + +namespace TetraCreations.Attributes +{ + [AttributeUsage(AttributeTargets.Field, Inherited = true)] + public class RequiredAttribute : PropertyAttribute + { + + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/RequiredAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/RequiredAttribute.cs.meta new file mode 100644 index 0000000..7a82f75 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/RequiredAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6e42d141fdead4f419cda48504ceaa8c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SnappedSliderAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SnappedSliderAttribute.cs new file mode 100644 index 0000000..ec2f57e --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SnappedSliderAttribute.cs @@ -0,0 +1,56 @@ +using System.Linq; +using UnityEngine; + +namespace TetraCreations.Attributes +{ + public class SnappedSliderAttribute : PropertyAttribute + { + public float Step { get; private set; } + public float Min { get; private set; } + public float Max { get; private set; } + public int Precision { get; private set; } + public bool AllowNonStepReach { get; private set; } + public bool IsInt { get; private set; } + + /// + /// Increase a float value in step

+ /// Value is clamped by min and max parameters + ///
+ /// Value to add + /// + /// + public SnappedSliderAttribute(float step, float min, float max) + { + Step = step; + Min = min; + Max = max; + Precision = CountFloatDigits(step); + } + + /// + /// Increase an int value in step

+ /// Value is clamped by min and max parameters + ///
+ /// Value to add + /// + /// + /// + public SnappedSliderAttribute(int step, int min, int max, bool allowNonStepReach = true) + { + Min = min; + Max = max; + Step = step; + AllowNonStepReach = allowNonStepReach; + IsInt = true; + } + + private int CountFloatDigits(float n, int precisionLimit = 7) + { + return Mathf.Min(n.ToString(System.Globalization.CultureInfo.InvariantCulture) + .SkipWhile(c => c != '.') + .Skip(1) + .Count(), + precisionLimit); + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SnappedSliderAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SnappedSliderAttribute.cs.meta new file mode 100644 index 0000000..c8334c3 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SnappedSliderAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b069aed210d19b44a07d1409301c51c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SpritePreviewAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SpritePreviewAttribute.cs new file mode 100644 index 0000000..c43767a --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SpritePreviewAttribute.cs @@ -0,0 +1,30 @@ +using System; +using UnityEngine; + +namespace TetraCreations.Attributes +{ + [AttributeUsage(AttributeTargets.Field, Inherited = true)] + public class SpritePreviewAttribute : PropertyAttribute + { + public const CustomColor DefaultBackgroundColor = CustomColor.DarkGray; + + public bool UseAssetPreview { get; private set; } + public float MaximumHeight { get; private set; } + public CustomColor BackgroundColor { get; private set; } + public string BackgroundColorString { get; private set; } + + /// + /// Dispaly the texture below a sprite field. + /// + /// Maximum height of the preview (With useAssetPreview set to false) + /// The color behind the texture + /// If true it will use AssetPreview.GetAssetPreview to draw the texture, the maximumHeight doesn't change anyting + public SpritePreviewAttribute(float maximumHeight = 256f, CustomColor backgroundColor = DefaultBackgroundColor, bool useAssetPreview = false) + { + UseAssetPreview = useAssetPreview; + MaximumHeight = maximumHeight; + BackgroundColor = backgroundColor; + BackgroundColorString = ColorUtility.ToHtmlStringRGB(BackgroundColor.ToColor()); + } + } +} diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SpritePreviewAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SpritePreviewAttribute.cs.meta new file mode 100644 index 0000000..7a9b83e --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/SpritePreviewAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a652095430dc9c5449a1356f64e217e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TetraCreations.Attributes.asmdef b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TetraCreations.Attributes.asmdef new file mode 100644 index 0000000..8832b5c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TetraCreations.Attributes.asmdef @@ -0,0 +1,14 @@ +{ + "name": "TetraCreations.Attributes", + "rootNamespace": "", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TetraCreations.Attributes.asmdef.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TetraCreations.Attributes.asmdef.meta new file mode 100644 index 0000000..df617e5 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TetraCreations.Attributes.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2870bc0b4b018d04e8ebe52993b57c6d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TitleAttribute.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TitleAttribute.cs new file mode 100644 index 0000000..258fb2b --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TitleAttribute.cs @@ -0,0 +1,40 @@ +using UnityEngine; +using System; + +namespace TetraCreations.Attributes +{ + [AttributeUsage(AttributeTargets.Field, Inherited = true)] + public class TitleAttribute : PropertyAttribute + { + #region Constants + public const float DefaultLineHeight = 1f; + public const CustomColor DefaultLineColor = CustomColor.LightGray; + public const CustomColor DefaultTitleColor = CustomColor.Bright; + #endregion + + #region Properties + public string Title { get; private set; } + public float LineHeight { get; private set; } + public CustomColor LineColor { get; private set; } + public CustomColor TitleColor { get; private set; } + public string LineColorString { get; private set; } + public string TitleColorString { get; private set; } + public float Spacing { get; private set; } + public bool AlignTitleLeft { get; private set; } + #endregion + + public TitleAttribute(string title = "", CustomColor titleColor = DefaultTitleColor, + CustomColor lineColor = DefaultLineColor, float lineHeight = DefaultLineHeight, float spacing = 14f, + bool alignTitleLeft = false) + { + Title = title; + TitleColor = titleColor; + LineColor = lineColor; + TitleColorString = ColorUtility.ToHtmlStringRGB(TitleColor.ToColor()); + LineColorString = ColorUtility.ToHtmlStringRGB(LineColor.ToColor()); + LineHeight = Mathf.Max(1f, lineHeight); + Spacing = spacing; + AlignTitleLeft = alignTitleLeft; + } + } +} \ No newline at end of file diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TitleAttribute.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TitleAttribute.cs.meta new file mode 100644 index 0000000..856d5b4 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Core/TitleAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6bdbc990bdaefcf41bffe14abf791a6f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation.meta new file mode 100644 index 0000000..14cf57a --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21784e8e604930e48ae4a088c56892b9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.md b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.md new file mode 100644 index 0000000..eaf41f6 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.md @@ -0,0 +1,471 @@ +# Tetra Attributes 1.1.0 : Documentation # + +![alt text](Screenshots/Tetra%20creation%20attributes.png) + +# Importing the Asset # +If you not familiar on how to install an asset, once you have purchased it, click on **Window → Package Manager** to reveal a window with all your available assets. + +Type in the search field **Tetra Attributes** to download and install the last version. Follow the steps and wait till Unity finishes compiling your project. + +
+ +# Introduction # + +This is a collection of C# attributes for the Unity editor that I use in most of my projects. Some are essential, like ReadOnly, which I've been using for several years. While others like Title are more for keeping the inspector window organised and clear. + +## Changelog : 1.1.0 ## + +- Added SpritePreview attribute to display the texture below a Sprite field. +- PathReference : Fixed console error "InvalidOperationException: Stack empty". After closing the folder selection dialog window without selecting anything. +- PathReference : Added the possibility to delete the folder reference when pressing the delete key while hovering the field. +- Renamed TitleColor enum to CustomColor because it's now used in SpritePreview. + +**Important** : You will have to replace all Title references using **TitleColor** in you project with **CustomColor**. + +--- + +## Usage ## + +Once imported simply add this line to your file header to use any attributes : + +> using TetraCreations.Attributes; + +All Property, Decorator drawers and Editor scripts are inside the namespace : + +> TetraCreations.Attributes.Editor + +An example scene with the AttributesExample script using every attributes is available in : +> Assets/Tetra Creations/Attributes/Example/Example.unity + +## Table of Contents ## +- [Normal Attributes](#normal-attributes) + - [\[Tile\]](#tile) + - [\[ReadOnly\]](#readonly) + - [\[DrawIf\]](#drawif) + - [\[HelpBox\]](#helpbox) + - [\[MinMaxSlider\]](#minmaxslider) + - [\[SnappedSlider\]](#snappedslider) + - [\[Required\]](#required) + - [\[SpritePreview\]](#spritepreview) +- [Special Attributes](#special-attributes) + - [\[PathReference\]](#pathreference) + - [\[Button\]](#button) + +
+ +# Normal Attributes # + +## [Tile] ## + +Alternative to **Header** attribute but with a line to separate the title from other fields. + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [Title("Nice title attribute !", + CustomColor.Yellow, CustomColor.Orange, 2f, 20f)] + public bool DrawOtherFields +} +``` + +### Result ### + +![alt text](Screenshots/Title%20Example.png) + +### Constructor ### + +```cs +public TitleAttribute(string title = "", + CustomColor CustomColor = DefaultCustomColor, + CustomColor lineColor = DefaultLineColor, + float lineHeight = DefaultLineHeight, + float spacing = 14f, + bool alignTitleLeft = false) +{ + Title = title; + CustomColor = CustomColor; + LineColor = lineColor; + CustomColorString = ColorUtility.ToHtmlStringRGB(CustomColor.GetColor()); + LineColorString = ColorUtility.ToHtmlStringRGB(LineColor.GetColor()); + LineHeight = Mathf.Max(1f, lineHeight); + Spacing = spacing; + AlignTitleLeft = alignTitleLeft; +} +``` + +### Constants ### +```cs +public const float DefaultLineHeight = 1f; +public const CustomColor DefaultLineColor = CustomColor.LightGray; +public const CustomColor DefaultCustomColor = CustomColor.Bright; +``` + +--- + +## [ReadOnly] ## + +Used to disable modifications to a serialized field. + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [ReadOnly] + public float ReadOnlyFloat; +} +``` + +### Result ### + +![alt text](Screenshots/ReadOnly%20Example.png) + +### Constructor ### + +There are no parameters for this attribute. + +--- + +## [DrawIf] ## + +Draw a property field if the condition is true. (Only for Boolean and Enum) +In the example below, we are hiding the field **Name** until the **DrawOtherFields** field value is set to true. + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + public bool DrawOtherFields = false; + + [DrawIf(nameof(DrawOtherFields), true)] + public string Name; +} +``` + +### Result ### + +False + +![alt text](Screenshots/DrawIf%20Example%20False.png) + +True + +![alt text](Screenshots/DrawIf%20Example%20True.png) + +### Constructor ### + +```cs +/// +/// Only draws the field if the condition is true.

+/// Supports Boolean and Enum. +///
+/// The name of the property that is being compared (case sensitive). +/// The value the property is being compared to. +/// Determine if it will hide the field or make it read only if the condition is NOT met. +/// Defaulted to DisablingType.DontDraw. + +public DrawIfAttribute(string comparedPropertyName, + object comparedValue, + DisablingType disablingType = DisablingType.DontDraw) +{ + ComparedPropertyName = comparedPropertyName; + ComparedValue = comparedValue; + DisablingType = disablingType; +} +``` + +--- + +## [HelpBox] ## + +Display an help box in the inspector with a message and a type (None, Info, Warning, Error) + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [HelpBox("HelpBox attribute is useful to describe the usage of a field directly on the inspector window.", HelpBoxMessageType.Warning)] + public bool ToggleToEdit = false; +} +``` + +### Result ### + +![alt text](Screenshots/HelpBox%20Example.png) + +### Constructor ### + +```cs +public HelpBoxAttribute(string text, + HelpBoxMessageType messageType = HelpBoxMessageType.None, + float minimumHeight = 20, + int fontSize = 12) +{ + Text = text; + MessageType = messageType; + MinimumHeight = minimumHeight; + FontSize = fontSize; +} +``` +--- + +## [MinMaxSlider] ## + +Show a slider with minimum and maximum values for a Vector2. + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [MinMaxSlider(0, 100)] + public Vector2 MinMaxSliderAttribute; +} +``` + +### Result ### + +![alt text](Screenshots/MinMaxSlider%20Example.png) + +### Constructor ### + +```cs +public MinMaxSliderAttribute(float min, float max) +{ + Min = min; + Max = max; +} +``` +--- + +## [SnappedSlider] ## + +Draw a slider to increase an integer or a float value by a certain amount (step) and clamped by a minimum and a maximum value. (Only for Integer and Float) + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [SnappedSlider(0.25f, 1f, 10f)] + Public float SnappedFloat; +} +``` + +### Result ### + +![alt text](Screenshots/Snapped%20float%20Example.png) + +
+ +### Constructors ### + +```cs +/// +/// Increase a float value in step

+/// Value is clamped by min and max parameters +///
+/// Value to add +/// +/// +public SnappedSliderAttribute(float step, float min, float max) +{ + Step = step; + Min = min; + Max = max; + Precision = MathExtensions.CountFloatDigits(step); +} + +/// +/// Increase an int value in step

+/// Value is clamped by min and max parameters +///
+/// Value to add +/// +/// +/// +public SnappedSliderAttribute(int step, int min, int max, bool allowNonStepReach = true) +{ + Min = min; + Max = max; + Step = step; + AllowNonStepReach = allowNonStepReach; + IsInt = true; +} +``` +--- + +## [Required] ## + +Draw an Help Box (Error Type) if a field value is empty or null. + +### Supported SerializedPropertyType ### + +* String +* ObjectReference +* ExposedReference +* ManagedReference + +
+ +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [Required] + public Collider Collider; +} +``` + +### Result ### + +![alt text](Screenshots/Required%20Example.png) + +### Constructor ### + +There are no parameters for this attribute. + +--- + +## [SpritePreview] ## + +Draw the texture below a sprite field. + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [SpritePreview] + public Sprite Sprite; +} +``` + +
+ +### Result ### + +![alt text](Screenshots/Sprite%20preview.png) + +### Constructor ### +```cs +/// +/// Dispaly the texture below a sprite field. +/// +/// Maximum height of the preview (With useAssetPreview set to false) +/// The color behind the texture +/// If true it will use AssetPreview.GetAssetPreview to draw the texture, the maximumHeight doesn't change anyting +public SpritePreviewAttribute(float maximumHeight = 256f, CustomColor backgroundColor = DefaultBackgroundColor, bool useAssetPreview = false) +{ + UseAssetPreview = useAssetPreview; + MaximumHeight = maximumHeight; + BackgroundColor = backgroundColor; + BackgroundColorString = ColorUtility.ToHtmlStringRGB(BackgroundColor.ToColor()); +} +``` + +
+ +# Special Attributes + +Theses are not working like usual attributes, PathReference is not even an attribute it's a serializable class. + +## [PathReference] ## + +Allow to store the GUI and the Path of an asset folder. +You can either drag and drop a folder or select it by clicking on the icon on the right. + +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + Public PathReference Path; +} +``` + +### Result ### + +![alt text](Screenshots/Path%20Example.png) + +### Constructor ### + +There are no parameters for this attribute. + +### Limitations ### + +You cannot call PathReference.Path at Runtime, because it's using AssetDatabase class. +You can only use the GUI Property. + +--- + +## [Button] ## + +Draw button in the inspector. +This works using several classes : +* ButtonAttribute +* Button +* ButtonDrawers +* EditorButtons + +
+ +### Usage ### + +```cs +public class AttributesExample : MonoBehaviour +{ + [Button(nameof(ButtonCallback), "Click on me !", 100f, row: "first")] + public void ButtonCallback() + { + Debug.Log("You clicked on a button, congrats."); + } + + [Button(nameof(Test), "Another button", 100f, row:"first")] + public void Test() + { + Debug.Log("This method is incredibly useful."); + } +} +``` + +### Result ### + +![alt text](Screenshots/Buttons%20Example.png) + +
+ +### Constructors ### + +```cs +public ButtonAttribute(string methodName, + string label = "", + float width = default, + int space = default, + string row = default) +{ + MethodName = methodName; + Label = label; + Space = space; + Row = row; + HasRow = !string.IsNullOrEmpty(Row); +} + +public Button(MethodInfo method, ButtonAttribute buttonAttribute) +{ + ButtonAttribute = buttonAttribute; + Label = string.IsNullOrEmpty(buttonAttribute.Label) ? ObjectNames.NicifyVariableName(method.Name) : buttonAttribute.Label; + Method = method; +} +``` + +### Limitations ### + +By default this wont work inside your custom editor because you need them to inherit from EditorButtons. + +--- diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.md.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.md.meta new file mode 100644 index 0000000..e1b1d4c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dc2d1b01447be7540864704b3fda1f16 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.pdf b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.pdf new file mode 100644 index 0000000..151db16 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.pdf differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.pdf.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.pdf.meta new file mode 100644 index 0000000..8cdbda7 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Documentation.pdf.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f449960bbcc36a34ca93593270a681e4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots.meta new file mode 100644 index 0000000..ad51c86 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5783129b447fde744ab708ff0238c078 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Buttons Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Buttons Example.png new file mode 100644 index 0000000..b22a8c8 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Buttons Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Buttons Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Buttons Example.png.meta new file mode 100644 index 0000000..27064d1 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Buttons Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 41a2599f23b4c0842af9d993020653a9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example False.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example False.png new file mode 100644 index 0000000..19972e8 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example False.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example False.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example False.png.meta new file mode 100644 index 0000000..46b0be3 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example False.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 40f7451a89a2de24582ffd1bc5579560 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example True.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example True.png new file mode 100644 index 0000000..c5cad28 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example True.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example True.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example True.png.meta new file mode 100644 index 0000000..5e3b3a6 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/DrawIf Example True.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: a83396ca5a67463499ba2e23f8a21807 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/HelpBox Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/HelpBox Example.png new file mode 100644 index 0000000..7840589 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/HelpBox Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/HelpBox Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/HelpBox Example.png.meta new file mode 100644 index 0000000..d9af09a --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/HelpBox Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: bb00d9cd925dace4f877c8509da26753 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/MinMaxSlider Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/MinMaxSlider Example.png new file mode 100644 index 0000000..350bdab Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/MinMaxSlider Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/MinMaxSlider Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/MinMaxSlider Example.png.meta new file mode 100644 index 0000000..baceeaa --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/MinMaxSlider Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 4bf191b3192f50f4b9e3fe3d748273c2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Path Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Path Example.png new file mode 100644 index 0000000..b60e511 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Path Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Path Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Path Example.png.meta new file mode 100644 index 0000000..ab32a87 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Path Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: e9c40e69ec724744e9afff30989c83c7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/ReadOnly Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/ReadOnly Example.png new file mode 100644 index 0000000..4d4d454 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/ReadOnly Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/ReadOnly Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/ReadOnly Example.png.meta new file mode 100644 index 0000000..1f040e5 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/ReadOnly Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 6d6eb1adfda2bde47bc6e28ee075d968 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Required Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Required Example.png new file mode 100644 index 0000000..18fec15 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Required Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Required Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Required Example.png.meta new file mode 100644 index 0000000..88e3b0c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Required Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: cf9582a3ddc60ed4c80acd544f943a73 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Snapped float Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Snapped float Example.png new file mode 100644 index 0000000..7859786 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Snapped float Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Snapped float Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Snapped float Example.png.meta new file mode 100644 index 0000000..583626c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Snapped float Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 4d041933ac141454bba5d818e757c27c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Sprite preview.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Sprite preview.png new file mode 100644 index 0000000..4c92904 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Sprite preview.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Sprite preview.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Sprite preview.png.meta new file mode 100644 index 0000000..219fc6c --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Sprite preview.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 204b71cb088ffe241b8f07f1b5f32b6b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Tetra creation attributes.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Tetra creation attributes.png new file mode 100644 index 0000000..7d8cb28 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Tetra creation attributes.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Tetra creation attributes.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Tetra creation attributes.png.meta new file mode 100644 index 0000000..154d480 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Tetra creation attributes.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: aefac71c0c99d1049bcb6da2d16171da +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Title Example.png b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Title Example.png new file mode 100644 index 0000000..153cbe9 Binary files /dev/null and b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Title Example.png differ diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Title Example.png.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Title Example.png.meta new file mode 100644 index 0000000..d0df4d3 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Documentation/Screenshots/Title Example.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 7295a76c66bdc83468f0573e4703b882 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor.meta new file mode 100644 index 0000000..9699f34 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b00aa949040cfdd4085ce4ccaeddbe24 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Button.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Button.cs new file mode 100644 index 0000000..b8940bf --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Button.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace TetraCreations.Attributes.Editor +{ + /// + /// Store MethodInfo to invoke it on click

+ /// By default the button label will be the method name + ///
+ public class Button + { + public string Label { get; private set; } + public MethodInfo Method { get; private set; } + public ButtonAttribute ButtonAttribute { get; private set; } + + public Button(MethodInfo method, ButtonAttribute buttonAttribute) + { + ButtonAttribute = buttonAttribute; + Label = string.IsNullOrEmpty(buttonAttribute.Label) ? ObjectNames.NicifyVariableName(method.Name) : buttonAttribute.Label; + Method = method; + } + + internal void Draw(IEnumerable targets) + { + if (!GUILayout.Button(Label)) return; + + foreach (object target in targets) + { + Method.Invoke(target, null); + } + } + } +} diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Button.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Button.cs.meta new file mode 100644 index 0000000..ce4d03b --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Button.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 53908815abd0b3040804933aab0c749f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/EditorButtons.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/EditorButtons.cs new file mode 100644 index 0000000..05bf7a9 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/EditorButtons.cs @@ -0,0 +1,39 @@ +using UnityEditor; +using UnityEngine; + +namespace TetraCreations.Attributes.Editor +{ + /// + /// Custom editor for UnityEngine.Object, this will instantiate a ButtonsDrawer.

+ /// Inside OnInspectorGUI() it will simply draw the default inspector.

+ /// Then it will draw all buttons.

+ /// You need to inherit from this class if you want to display buttons inside your custom editor. + ///
+ [CustomEditor(typeof(Object), true), CanEditMultipleObjects] + public class EditorButtons : UnityEditor.Editor + { + /// + /// Set to false if you don't want the buttons to be drawned + /// + private bool _enabled = true; + + private ButtonsDrawer _buttonsDrawer; + + protected virtual void OnEnable() + { + _buttonsDrawer = new ButtonsDrawer(target); + } + + public override void OnInspectorGUI() + { + if (serializedObject == null) { return; } + + DrawDefaultInspector(); + + if (_enabled && _buttonsDrawer != null) + { + _buttonsDrawer.DrawButtons(targets); + } + } + } +} diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/EditorButtons.cs.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/EditorButtons.cs.meta new file mode 100644 index 0000000..3e1fdaf --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/EditorButtons.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a9e8c01728df0a948a06f2b55561ef90 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Property Drawers.meta b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Property Drawers.meta new file mode 100644 index 0000000..5f43346 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Property Drawers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9779f1ef83e33c54db6e21552ea5efec +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Property Drawers/ButtonsDrawer.cs b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Property Drawers/ButtonsDrawer.cs new file mode 100644 index 0000000..6a97e24 --- /dev/null +++ b/Old version_1.0/Assets/HGF/Tetra Attributes/Editor/Property Drawers/ButtonsDrawer.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; + +namespace TetraCreations.Attributes.Editor +{ + /// + /// Used to draw buttons inside inspector using Button attribute on an method by using Reflection.

+ /// Buttons can be group together by using Row property like so :

+ /// [Button(nameof(ButtonCallback), "First Button", 100f, row: "first")] + /// [Button(nameof(ButtonCallback2), "Second Button", 100f, row: "first")] + ///
+ public class ButtonsDrawer + { + public List> ButtonGroups { get; private set; } + + public ButtonsDrawer(object target) + { + const BindingFlags flags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; + var methods = target.GetType().GetMethods(flags); + var buttons = new List