- Home /
Having an issue with setting the minimum size for a field size
When setting the field size to maximum of 14 from 12, the adjustment occurs, however, when setting the field size minimum from 5 to 4, there is no adjustment. This is as if the Unity engine is not allowing the script to fix the field size.
Can anyone look at my script in C# and see if you can find a different solution for setting the minimum field size that will accept a width of 4 and a height of 4?
Here is the C# script that I am working on:
public class LevelProfile { public static LevelProfile main; // current level public const int maxSize = 12; // maximal playing field size public const int minSize = 4; // minimal playing field size
public int levelID = 0; // Level ID
public int level = 0; // Level number
// field size
public int width = 9;
public int height = 9;
public int colorCount = 6; // count of chip colors
public int targetColorCount = 30; // Count of target color in Color mode
public int targetSugarDropsCount = 0; // Count of sugar chips in SugaDrop mode
public int firstStarScore = 100; // number of score points needed to get a first stars
public int secondStarScore = 200; // number of score points needed to get a second stars
public int thirdStarScore = 300; // number of score points needed to get a third stars
public float stonePortion = 0f;
Your answer
Follow this Question
Related Questions
Importing texture, problem with size - width and height get changed 3 Answers
How to find width and height of game object, Unity2D 2 Answers
Changing the size of a text object to only be as long as the letters 0 Answers
Object resolution 0 Answers
Unity not dividing correctly C# camera pixel width & height 1 Answer