Salut je me suis fait une window customisé transparente en png mais unity me l'affiche opaque? Y a t'il un reglage particulier à effectuer?
Merci
Alpha sur une texture "Custom style"
- artemisart
- Messages : 1893
- Inscription : 21 Juin 2011 19:51
- Localisation : Centre
- Contact :
Re: Alpha sur une texture "Custom style"
Salut,
Tu l'affiche comment ta window ?
Tu l'affiche comment ta window ?
Re: Alpha sur une texture "Custom style"
Salut,
Comme ceci :
Comme ceci :
Code : Tout sélectionner
void Update () {
windowLoading = new Rect (Screen.width / 8f , (Screen.height) -Screen.height / 2f,Screen.width / 5.5f ,Screen.height / 16);
}
void OnGUI(){
GUI.skin = skin;
windowLoading = GUI.Window(1, windowLoading , windowLoadingFunc, "",skin.customStyles[0]);
}
- artemisart
- Messages : 1893
- Inscription : 21 Juin 2011 19:51
- Localisation : Centre
- Contact :
Re: Alpha sur une texture "Custom style"
Pourquoi tu assigne windowLoading dans l'update ?
Si tu veux pas que la fenêtre bouge, ça sert à rien de remettre windowLoading = ... en OnGUI aussi, tu peux tout simplement faire GUI.Window (1, new Rect (...), ...
Test avec GUI.DrawTexture pour voir si ça prends en compte ou pas la transparence.
Si tu veux pas que la fenêtre bouge, ça sert à rien de remettre windowLoading = ... en OnGUI aussi, tu peux tout simplement faire GUI.Window (1, new Rect (...), ...
Test avec GUI.DrawTexture pour voir si ça prends en compte ou pas la transparence.
Re: Alpha sur une texture "Custom style"
Tiens, je connaissais pas "GUI.Window".
On apprend tous les jours !
On apprend tous les jours !
Re: Alpha sur une texture "Custom style"
Rien a voir avec le sujet mais, il devient pas de plus en plus balèze ton avatar Cayou ?
Stop les stéroïdes
Stop les stéroïdes