Topic: Rectangular (widescreen) Tileset map instead of square
Edit : Found solution, it was as simple as changing the Tileset Width (pixels) and Size (in scene) X options on the "OnlineMaps.cs" script. I think i was over-thinking it lol
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → Rectangular (widescreen) Tileset map instead of square
Edit : Found solution, it was as simple as changing the Tileset Width (pixels) and Size (in scene) X options on the "OnlineMaps.cs" script. I think i was over-thinking it lol
Hello.
If you just need to set the size, yes, this is the correct way.
If you want to dynamically change the size of this is not enough.
We have added a new method for the correct resize of tileset.
Please update Online Maps.
Example:
using UnityEngine;
public class ResizeMapExample:MonoBehaviour
{
private int[] widths = {1024, 2048};
private int height = 1024;
private int wIndex = 0;
private void OnGUI()
{
if (GUI.Button(new Rect(5, 5, 100, 30), "Resize"))
{
wIndex = 1 - wIndex;
OnlineMapsTileSetControl.instance.Resize(widths[wIndex], height);
}
}
}Hello.
If you just need to set the size, yes, this is the correct way.
If you want to dynamically change the size of this is not enough.
We have added a new method for the correct resize of tileset.
Please update Online Maps.Example:
using UnityEngine; public class ResizeMapExample:MonoBehaviour { private int[] widths = {1024, 2048}; private int height = 1024; private int wIndex = 0; private void OnGUI() { if (GUI.Button(new Rect(5, 5, 100, 30), "Resize")) { wIndex = 1 - wIndex; OnlineMapsTileSetControl.instance.Resize(widths[wIndex], height); } } }
Awesome
thank you!
Infinity Code Forum → Online Maps Help → Rectangular (widescreen) Tileset map instead of square
Powered by PunBB, supported by Informer Technologies, Inc.