- Home /
AutoResize Splash-Screen?
i have create splash screen image using (integrated with) plane, but its not autoresize in Android phone. can Any Master help me? to autoresize ? especially autoresize objek, like plane,3dmodel! thanks very much. C#
using UnityEngine;
using System.Collections;
public class Ganti : MonoBehaviour
{
public float timer = 5;
void Update()
{
timer -=Time.deltaTime;
if(timer > 0)
{
Debug.Log(timer);
}
else
{
Application.LoadLevel(1);
}
}
}
Answer by fafase · Nov 13, 2014 at 07:03 AM
Are you using GUITexture, Sprite or else?
In the end, the solution is the same, use the Screen.width and Screen.height and apply to the dimension of the object.
Keep in mind that the texture will stretchso maybe you want to have two different textures, one for 5:4 ratio and one for 16:9 ratio.
thanks for your answer fafase., i attach my image to plane(game Object) ,, how i can autorize this Plane for all screen size?? thanks for your answer :) C# pleasee :) can u show me the script, i don't have any idea.. :(
unity has released the new GUI which has a simple way to do this. place the corners of the sprite on the corners of the canvas, place the anchors of the sprite on the same. done.