@@ -10,20 +10,24 @@ internal class BitmapFontCreatorModel : ISerializationCallbackReceiver
1010 private const string IgnoreCharacter = "\n " ;
1111
1212 [ SerializeField ] private string _characters = string . Empty ;
13- public Orientation Orientation ;
14- public int Cols ;
15- public int Rows ;
16- public float AlphaThreshold ;
17- public bool Monospaced ;
18- public bool CaseInsentive ;
19- public float Ascent ;
20- public float Descent ;
21- public float FontSize ;
22- public bool AutoFontSize ;
23- public float LineSpacing ;
24- public bool AutoLineSpacing ;
25- public int DefaultCharacterSpacing ;
26- public List < CharacterProps > CustomCharacterProps ;
13+ public Orientation Orientation = Orientation . Horizontal ;
14+ public int Cols = 1 ;
15+ public int Rows = 1 ;
16+ public float AlphaThreshold = 0f ;
17+ public bool Monospaced = false ;
18+ public bool CaseInsentive = false ;
19+ public int Ascent = 0 ;
20+ public int Descent = 0 ;
21+ public int FontSize = 0 ;
22+ public bool AutoFontSize = true ;
23+ public int LineSpacing = 0 ;
24+ public bool AutoLineSpacing = true ;
25+ public int DefaultCharacterSpacing = 0 ;
26+ public List < CharacterProps > CustomCharacterProps = new ( ) ;
27+
28+ public BitmapFontCreatorModel ( ) { }
29+
30+ public BitmapFontCreatorModel ( BitmapFontCreatorModel from ) { from ? . CopyTo ( this ) ; }
2731
2832 public string Characters
2933 {
@@ -75,26 +79,5 @@ private void UpdateChacters()
7579
7680 public void OnBeforeSerialize ( ) { }
7781 public void OnAfterDeserialize ( ) { UpdateChacters ( ) ; }
78-
79- public static BitmapFontCreatorModel Default => new ( )
80- {
81- Characters = string . Empty ,
82- Orientation = Orientation . Horizontal ,
83- Cols = 1 ,
84- Rows = 1 ,
85- AlphaThreshold = 0f ,
86- LineSpacing = 0f ,
87- AutoLineSpacing = true ,
88- FontSize = 0f ,
89- AutoFontSize = true ,
90- Monospaced = false ,
91- CaseInsentive = false ,
92- Ascent = 0f ,
93- Descent = 0f ,
94- DefaultCharacterSpacing = 0 ,
95- CustomCharacterProps = new List < CharacterProps > ( ) ,
96- ValidCharacters = string . Empty ,
97- ValidCharactersCount = 0
98- } ;
9982 }
10083}
0 commit comments