В модель Setting добалено поле Signal
This commit is contained in:
parent
84d68d2b1a
commit
fdd773facd
@ -119,7 +119,7 @@ Material:
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.048059784, g: 0.091398515, b: 0.22641507, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0.04805976, g: 0.091398485, b: 0.22641504, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -132,7 +132,7 @@ Material:
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.08451105, g: 0, b: 0.25471696, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0.08451102, g: 0, b: 0.25471693, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -132,7 +132,7 @@ Material:
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0.33018863, b: 0.073129036, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0, g: 0.3301886, b: 0.073129006, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -119,7 +119,7 @@ Material:
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.07547168, g: 0.07547168, b: 0.07547168, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0.07547165, g: 0.07547165, b: 0.07547165, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c97246c0e3a7eff46acd53fd591fb800, type: 3}
|
||||
m_Name: Setting
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Setting
|
||||
Type: 0
|
||||
Type: 4
|
||||
Id: ASD
|
||||
Alias: intovaya
|
||||
Description: "\u0422\u0435\u0441\u0442 \u0438\u043D\u0442"
|
||||
@ -27,3 +27,4 @@ MonoBehaviour:
|
||||
FloatStep: 0
|
||||
StringValue:
|
||||
AllowedValues: []
|
||||
SignalValue:
|
||||
|
||||
@ -28,6 +28,10 @@ public class SettingEditor : Editor
|
||||
private SerializedProperty stringValueProperty;
|
||||
private SerializedProperty allowedValuesProperty;
|
||||
|
||||
//Signal fields
|
||||
private SerializedProperty signalProperty;
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// General fields
|
||||
@ -54,6 +58,9 @@ public class SettingEditor : Editor
|
||||
// String fields
|
||||
stringValueProperty = serializedObject.FindProperty("StringValue");
|
||||
allowedValuesProperty = serializedObject.FindProperty("AllowedValues");
|
||||
|
||||
//Signal fields
|
||||
signalProperty = serializedObject.FindProperty("SignalValue");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
@ -100,6 +107,10 @@ public class SettingEditor : Editor
|
||||
EditorGUILayout.PropertyField(stringValueProperty);
|
||||
EditorGUILayout.PropertyField(allowedValuesProperty);
|
||||
break;
|
||||
case Setting.SettingType.Signal:
|
||||
EditorGUILayout.LabelField("Signal Settings", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(signalProperty);
|
||||
break;
|
||||
}
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "Setting", menuName = "Settings/Setting")]
|
||||
[System.Serializable]
|
||||
[CreateAssetMenu(fileName = "Setting", menuName = "Settings/Setting"), System.Serializable]
|
||||
public class Setting : ScriptableObject
|
||||
{
|
||||
//general
|
||||
@ -30,13 +29,16 @@ public class Setting : ScriptableObject
|
||||
//type: String
|
||||
public string StringValue;
|
||||
public List<string> AllowedValues;
|
||||
|
||||
|
||||
//type: Signal
|
||||
public string SignalValue;
|
||||
|
||||
public enum SettingType
|
||||
{
|
||||
Int,
|
||||
Float,
|
||||
String,
|
||||
Bool
|
||||
Bool,
|
||||
Signal
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,8 +12,8 @@ PlayerSettings:
|
||||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: DefaultCompany
|
||||
productName: SeaBattle. Torpeda
|
||||
companyName: Robotic Retailers
|
||||
productName: Sea battle. Torpeda
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user