Initialize grid values in-line
This commit is contained in:
@@ -12,6 +12,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 20553fac56ec59645857c0732b787431, type: 3}
|
||||
m_Name: OVRBuildConfig
|
||||
m_EditorClassIdentifier:
|
||||
androidSDKPath: C:\Users\tvero\AppData\Local\Android\Sdk
|
||||
androidSDKPath:
|
||||
gradlePath:
|
||||
jdkPath:
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace QuestAppLauncher
|
||||
[Serializable]
|
||||
public class GridSize
|
||||
{
|
||||
public int rows;
|
||||
public int cols;
|
||||
public int rows = 3;
|
||||
public int cols = 3;
|
||||
}
|
||||
|
||||
public GridSize gridSize;
|
||||
|
||||
@@ -146,12 +146,6 @@ namespace QuestAppLauncher
|
||||
private void ProcessGridSize()
|
||||
{
|
||||
// Make sure grid size have sane value
|
||||
if (0 == this.config.gridSize.cols && 0 == this.config.gridSize.rows)
|
||||
{
|
||||
// If not initialized, default to 3x3
|
||||
this.config.gridSize.cols = 3;
|
||||
this.config.gridSize.rows = 3;
|
||||
}
|
||||
this.config.gridSize.cols = Math.Min(this.config.gridSize.cols, 10);
|
||||
this.config.gridSize.cols = Math.Max(this.config.gridSize.cols, 1);
|
||||
this.config.gridSize.rows = Math.Min(this.config.gridSize.rows, 50);
|
||||
|
||||
Reference in New Issue
Block a user