SchultzGames
Para tirar dúvidas, crie um tópico especifico na área "Dúvidas em Geral" e aguarde ser respondido. Evite comentar em tópicos não relacionados a sua dúvida :D
TÓPICOS RECENTES:
Tópico:
Postado em:
Postado por:
ShapeKeys do Blender para a Unity altera áreas próximas
COMO EVITAR QUE UM OBJETO (PLAYER,ITEM ETC...) ATRAVESSE UMA PAREDE.
Ajuda em Script de Verificação de Ação e Reação
unity Failed to load PlayerSettings (internal index #0). Most likely data f
modelar avatar e skins para um jogo web
PRECISO FAZER QUE MEU GAME FIQUE ONLINE
Materiais do Blander não aparecem no MeshRendere do Objeto na Unity
Repetiçoes de Textura no Terreno
SERVER IS DOWN - UNITY+MSQL
Procuro programadores - Novo jogo
Problema com o MS VEHICLES
Preciso de ajuda com a Unity
Problema com vídeo em 360° na Unity
Problemas no MS Vehicles
unity- eventos na Animação com Armature/Bones vinda do blender não funciona
ajuda exibir resultados simulados em uma liga Game Unity
Unity - ParticleSystem não é redirecionado no rawimage no canvas
Como resolver o problema de "face orientation" no Blender.
[DÚVIDA] Tive um problema com meu Canvas
erro na Directional Light
Problemas com o Directional Light da Unity 3D
210 Linhas de código para inimigo é muito grande?
Novo jogo da franquia Sphere game em desenvolvimento
malha da roda não girando com wheel collider unity
Problemas com ambiguidade
Touch mobile
INVALID TOKEN
Como acessar o "HD Render Pipeline" do HDRP por script?
CHAT GPT PRA JOGO DE TIRO? comentem
Tutorial script inimigo segue e foge do player
Ainda vale a pena lançar Asset na Asset Store?
Ajuda com tabela de historico de pontuaçao.
[TUTORIAL] Entrar no carro estilo GTA
Como derrapar um Whell Collider
Como altertar o valor do "Asymptote Value" do Whell Collider via Script
Preciso de ajuda para substituir valor de variavel em outro script
Ajuda com Top Down Shooter utilizando Photon
Duvida com Netcode
[RESOLVIDO] Unity - Movendo a Câmera na Horizontal/Vertical com Touch
Alguém me ajuda com os anúncios pfv
Segundo Trailer do jogo Dark Age, Feliz Natal a todos!
Unity - ScrollRect, Viewport, Content - O Conteúdo ñ inicia no topo
Coleta de itens
Unity - Cadastro do email do jogador
[GRATIS] PACK DE MODELOS 3D PARA JOGO DE TERROR
Onde Conseguir músicas para meu Jogo?
error CS0246 em Script
Alguem teve ja esse problema?
[Projeto em Andamento] Draug, um jogo de hordas
DISPONIVEL PARA FAZER MODELOS 3D
Unity-Loja.Como os Jogadores terão acesso aos ítens comprados na PlayStore?
Bugando depois do Build.
Primeiro Trailer do jogo Dark Age
Problema com sombra
Mesh e Material do objeto trocando para uma instancia no inicio do jogo
[RESOLVIDO] Unity - RawImages_Layer_Camera
INVESTIMENTO EM JOGOS E BANCO DE TALENTO
Teaser do meu novo projeto pessoal, Dark Age
Preciso de ajuda com mudança para mobile androide.
[RESOLVIDO] Posição final do objeto em jogo 2D
Input.GetAxis() obedercer a orientação de um objeto.
Interação com elementos UI
Meu primeiro jogo na steam
Minimap/Radar/GPS Estilo GTA V
[RESOLVIDO] Erro no console depois que formatei o pc
PACK GRÁTIS de Músicas ELETRÔNICAS para ajudar vocês em seus Jogos Indies!
[TUTORIAL] Entenda como funciona: ENUM, SWITCH, BREAK, CASE no C#
O Labirinto II - Baixe o Jogo
Qual e o codigo de Botões na unity para saber seus estados?
Como carregar itens pequenos dentro do carro sem que atravesse os colliders
[Duvida] Script pegar itens
Travamento ao trocar de cena
Colisão zoada e movimentação
Salvar objetos que foram destruidos entre cenas na unity
Quero começa a desenvolver um jogo de luta porem eu queria aprender a faze
Pegar qual objeto colidiu com o Linecast.
movimentação e camera?
[RESOLVIDO] Unity - SceneManager.LoadScene abre scene com objeto "vazio"
[RESOLVIDO] ajuda sobre skybox
MEU SIMULADOR DE CARRO
[_____IMPORTANTE_____] ALTERAÇÕES NA POLÍTICA DE COBRANÇA DA UNITY
[RESOLVIDO] Ausencia da funçao NavMesh na Unity 2022.2.12
[_____IMPORTANTE_____] ALTERAÇÕES NA POLÍTICA DE COBRANÇA DA UNITY - 2
Roll Up Um jogo de aventura e desáfios
Terminologia da Unity em outras engines
Como criar a iluminação do Sol no Sistema Solar?
Conexão de lobby pelo OnConnectedToMaster
Problema na exportção de projeto unity
[RESOLVIDO] Unity - Áudios estão emitindo som só Depois do Botão ser solto
Unity - Banco de Dados Online junto ao Jogo
Player virar para o inimigo(Prefab)
[TUTORIAL] Sistema De Save Game Ao Sair Da Fase
Problema de Sincronização de um objeto de um jogo multiplayer usa q Photon
Unity - Compartilhar meu Jogo
Alguém que manja do Google ADmob?
Unity - Avaliar meu Jogo
[RESOLVIDO] Destruir inimigo com o player.
Salvar e carregar dados na Unity de objetos prefabs sem sobrescrever os dad
Unity - Salvar os Dados do Jogador Online
Ontem à(s) 10:09 pm
Dom Mar 10, 2024 2:30 pm
Sex Mar 01, 2024 1:27 pm
Qui Fev 22, 2024 9:57 pm
Qua Fev 21, 2024 10:39 am
Ter Fev 20, 2024 9:28 am
Ter Fev 20, 2024 12:15 am
Seg Fev 19, 2024 1:06 pm
Seg Fev 12, 2024 1:56 pm
Seg Fev 12, 2024 1:17 pm
Dom Fev 11, 2024 8:55 pm
Dom Fev 11, 2024 11:16 am
Seg Fev 05, 2024 4:18 pm
Dom Fev 04, 2024 9:39 pm
Qua Jan 31, 2024 11:59 pm
Ter Jan 30, 2024 7:37 pm
Ter Jan 23, 2024 6:33 pm
Dom Jan 21, 2024 6:03 pm
Sáb Jan 20, 2024 7:03 pm
Sáb Jan 20, 2024 6:58 pm
Sáb Jan 20, 2024 6:39 pm
Sex Jan 19, 2024 1:29 pm
Sex Jan 19, 2024 8:40 am
Dom Jan 14, 2024 5:30 pm
Qua Jan 10, 2024 10:29 pm
Qua Jan 10, 2024 8:55 pm
Qua Jan 10, 2024 7:14 pm
Ter Jan 09, 2024 3:55 pm
Ter Jan 09, 2024 8:04 am
Sáb Jan 06, 2024 8:02 pm
Sex Jan 05, 2024 7:01 am
Sex Jan 05, 2024 12:12 am
Qui Jan 04, 2024 6:55 pm
Qui Jan 04, 2024 12:52 pm
Qui Jan 04, 2024 4:34 am
Ter Jan 02, 2024 11:48 pm
Dom Dez 31, 2023 7:25 pm
Qua Dez 27, 2023 5:44 pm
Qua Dez 27, 2023 3:08 pm
Sáb Dez 23, 2023 7:27 pm
Sáb Dez 23, 2023 5:06 pm
Qui Dez 21, 2023 8:10 pm
Seg Dez 18, 2023 2:04 pm
Sex Dez 15, 2023 5:11 pm
Qui Dez 14, 2023 9:13 pm
Qui Dez 14, 2023 2:47 pm
Qui Dez 14, 2023 1:48 pm
Qua Dez 13, 2023 8:58 pm
Ter Dez 12, 2023 2:32 pm
Seg Dez 11, 2023 1:53 pm
Qua Dez 06, 2023 8:13 pm
Sáb Dez 02, 2023 8:06 pm
Qui Nov 30, 2023 7:49 am
Seg Nov 27, 2023 1:35 am
Qua Nov 22, 2023 7:37 am
Qui Nov 09, 2023 1:22 pm
Seg Nov 06, 2023 11:59 am
Ter Out 31, 2023 9:53 am
Dom Out 29, 2023 8:05 pm
Dom Out 29, 2023 3:03 am
Sex Out 27, 2023 3:43 pm
Sex Out 27, 2023 3:28 pm
Qua Out 25, 2023 1:20 pm
Seg Out 23, 2023 10:34 am
Dom Out 22, 2023 6:55 pm
Qui Out 19, 2023 11:57 pm
Qui Out 19, 2023 6:39 pm
Ter Out 17, 2023 6:37 pm
Ter Out 17, 2023 6:18 pm
Seg Out 16, 2023 1:59 pm
Sáb Out 14, 2023 12:15 pm
Qua Out 11, 2023 6:07 pm
Seg Out 09, 2023 4:19 pm
Qua Out 04, 2023 12:12 pm
Qua Out 04, 2023 12:11 pm
Ter Out 03, 2023 9:18 pm
Ter Out 03, 2023 9:08 pm
Ter Out 03, 2023 6:05 pm
Ter Set 26, 2023 12:45 pm
Seg Set 25, 2023 9:02 pm
Seg Set 25, 2023 9:47 am
Sáb Set 23, 2023 2:10 pm
Sex Set 22, 2023 9:01 pm
Qui Set 21, 2023 11:04 am
Qua Set 20, 2023 4:40 pm
Qua Set 20, 2023 9:15 am
Dom Set 17, 2023 12:17 pm
Sex Set 15, 2023 7:24 pm
Sex Set 15, 2023 5:41 pm
Sex Set 15, 2023 4:28 pm
Sex Set 15, 2023 10:56 am
Sex Set 15, 2023 10:15 am
Seg Set 11, 2023 11:43 am
Seg Set 11, 2023 11:31 am
Sáb Set 09, 2023 4:53 pm
Sáb Set 09, 2023 1:44 pm
Ter Set 05, 2023 11:12 pm
Ter Set 05, 2023 3:12 pm
Seg Set 04, 2023 11:53 pm



































































































[TUTORIAL] Como fazer uma Barra de Loading na Unity 5

+20
JohnRambo
rafaelllsd
bymaxbig
dinho
Soulphantom
anizioNoob
KramicGamer
LeonradoGp
hellkiller
Thalles Br
paladinojl
RenanMSV
augustines
cosmoplay
Marssa
FerX95
Chilinger
GustavoMaster
ParazitaGamerBR
MarcosSchultz
24 participantes

Página 2 de 2 Anterior  1, 2

Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por RenanMSV Qui Jun 09, 2016 3:35 pm

Se a cena for leve, o carregamento será rapido mesmo.
RenanMSV
RenanMSV
Instrutor

Masculino PONTOS : 4236
REPUTAÇÃO : 356
Áreas de atuação : Programação em C#, PHP. SQL, JavaScript (Web)
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por Soulphantom Qui Jun 09, 2016 4:00 pm

no caso pra demorar mais uso o yield com o waitiforseconds ?

Soulphantom
Membro
Membro

Masculino PONTOS : 2978
REPUTAÇÃO : 3
Idade : 23
Áreas de atuação : PHP,HTML,C#,Blender etc

Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Sex Jun 10, 2016 6:03 pm

Soulphantom escreveu:no caso pra demorar mais uso o yield com o waitiforseconds ?

Segue aquele tutorial que eu linkei.... 

usa o yield e diz quanto tempo quer esperar...
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por dinho Dom Ago 28, 2016 7:48 pm

Olá Marcos  primeiramente parabéns pelo tutorial , estou acompanhando suas aulas e ao mesmo tempo que estou ficando viciado em programação também estou ficando MALUCOOOO!!! Pois bem.. no meu caso aparece essa mensagem, vc pode me ajuda? =>
[TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 <img src=" />
Asynchronous Background loading is only supported in Unity Pro.
Please use Application.LoadLevel or Application.LoadLevelAdditive instead.
UnityEngine.Application:LoadLevelAsync(String)
<CenaDeCarregamento>c__Iterator3B:MoveNext() (at Assets/Scripts/Loading.cs:37)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Loading:Start() (at Assets/Scripts/Loading.cs:31)
dinho
dinho
Membro
Membro

Masculino PONTOS : 3164
REPUTAÇÃO : 5
Áreas de atuação : Desenhista e Modelador 3D.
Modelagem em Blender.
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

http://www.andersondesigner.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Dom Ago 28, 2016 11:04 pm

dinho escreveu:Olá Marcos  primeiramente parabéns pelo tutorial , estou acompanhando suas aulas e ao mesmo tempo que estou ficando viciado em programação também estou ficando MALUCOOOO!!! Pois bem.. no meu caso aparece essa mensagem, vc pode me ajuda? =>
[TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 <img src=" />
Asynchronous Background loading is only supported in Unity Pro.
Please use Application.LoadLevel or Application.LoadLevelAdditive instead.
UnityEngine.Application:LoadLevelAsync(String)
<CenaDeCarregamento>c__Iterator3B:MoveNext() (at Assets/Scripts/Loading.cs:37)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Loading:Start() (at Assets/Scripts/Loading.cs:31)

Qual a versão da sua Unity? é a Unity 4 ainda? Pois o erro aparenta ser sobre isto, e o tutorial é feito para Unity 5+
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por anizioNoob Seg Ago 29, 2016 8:43 am

gente uma duvida, porque vcs não usam UI em vez de GUI? por para mim que ama customização, e personalizar tudo do meu jeito fica meio complicado deixar tudo do meu estilo, e também faria aqueles que não assestem os videos tutorial assistirem para saber como fazer tudo certinho :D só uma sugestão
anizioNoob
anizioNoob
Avançado
Avançado

Masculino PONTOS : 3229
REPUTAÇÃO : 17
Idade : 22
Áreas de atuação : Sei programar animators, e modelar no sketchup
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Ter Ago 30, 2016 11:15 pm

anizioNoob escreveu:gente uma duvida, porque vcs não usam UI em vez de GUI? por para mim que ama customização, e personalizar tudo do meu jeito fica meio complicado deixar tudo do meu estilo, e também faria aqueles que não assestem os videos tutorial assistirem para saber como fazer tudo certinho :D só uma sugestão
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Seg Jan 02, 2017 2:10 am

eu to criando um jogo de terror e nele tem um sistema de portas que quando vc aperta a tecla e ele vai pra outra cena, mas como a outra cena e muito pesada ele trava,  dai queria saber com faço para dar uma condição para quando eu aperta "E" ele vai pra o loading e depois para outra cena... :D :D :D
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por rafaelllsd Seg Jan 02, 2017 2:18 am

bymaxbig escreveu:eu to criando um jogo de terror e nele tem um sistema de portas que quando vc aperta a tecla e ele vai pra outra cena, mas como a outra cena e muito pesada ele trava,  dai queria saber com faço para dar uma condição para quando eu aperta "E" ele vai pra o loading e depois para outra cena... :D :D :D
Se você está querendo entra na cena de carregamento clicando na letra "E", é só modifica
Isso:
Código:
if (Input.GetKeyDown (KeyCode.Space)) {
 StartCoroutine(CenaDeCarregamento(cenaACarregar));
 }
 }
Por Isto:
Código:
if (Input.GetKeyDown (KeyCode.E)) {
 StartCoroutine(CenaDeCarregamento(cenaACarregar));
 }
 }
rafaelllsd
rafaelllsd
ProgramadorMaster

Masculino PONTOS : 4994
REPUTAÇÃO : 507
Idade : 23
Áreas de atuação : Unity, Audacity, Blender, Gimp, C#, JS, MySQL.

Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Seg Jan 02, 2017 2:27 am

Não tipo, o que eu tô dizendo é que eu tenho um script bem detalhado dá porta pra troca de cenas porém eu queria saber como eu faço para que quando eu chegar na porta e aperta a tecla "E" ele irá para a página de carregamento e depois pra a cena que é indicada pela porta só que os dois scripts são completamente diferentes como eu faria pra que os dois travassem juntos e só quando eu chegar na porta
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por JohnRambo Seg Jan 02, 2017 4:12 pm

Se você já tiver feito o comando pra da porta ir para a cena de carregamento, Na sua cena de carregamento, crie um objeto e nele coloque este script.

Código:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class CONTADOR : MonoBehaviour {
 public bool counterEnable = false;
 public float counter;
 public int tempoDesejado = 5;
 void Start (){
 counterEnable = true;
 }
 void Update (){
 if (counterEnable == true){
 counter += Time.deltaTime;
 }
 if (counter >= tempoDesejado){
 SceneManager.LoadScene("SUACENA");
 counterEnable = false;
 counter = 0;
 }
 }
 }


No script onde tá escrito "SUACENA" você coloca o nome exato da cena que ira abrir após o carregamento
JohnRambo
JohnRambo
Moderador

Masculino PONTOS : 4927
REPUTAÇÃO : 661
Idade : 23
Áreas de atuação : Unity;
Programação;
Música e Sonorização;
Graduado em Análise e Desenvolvimento de Sistemas;
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Seg Jan 02, 2017 4:42 pm

John Rambo escreveu:Se você já tiver feito o comando pra da porta ir para a cena de carregamento, Na sua cena de carregamento, crie um objeto e nele coloque este script.

Código:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class CONTADOR : MonoBehaviour {
 public bool counterEnable = false;
 public float counter;
 public int tempoDesejado = 5;
 void Start (){
 counterEnable = true;
 }
 void Update (){
 if (counterEnable == true){
 counter += Time.deltaTime;
 }
 if (counter >= tempoDesejado){
 SceneManager.LoadScene("SUACENA");
 counterEnable = false;
 counter = 0;
 }
 }
 }


No script onde tá escrito "SUACENA" você coloca o nome exato da cena que ira abrir após o carregamento
intendi porem dessa forma nao funcionaria  no meu caso.

esse e o meu script, e tipo, ele ja faz tudo eu so quero colocar o script de carregamento pra trabalhar junto com ele, 
Código:
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(AudioSource))]
public class PortaNiveis : MonoBehaviour {
 public Font Fonte;
 public Color cor;
 public bool Trancada;
 public float Distancia = 3;
 public float  tempoDoAviso = 2;
 public string Nomedacena;
 public AudioClip audioPortaAbrindo,audioPortaTrancada,audioDestrancandoporta;
 public Texture textura;
 private bool avisoPortaTrancada,ativarCarregamento;
 public bool TemAChave = false;
 public int IDdaChave;
 private GameObject Jogador;
 private float cronometroAviso,cronometroCarregamento;
 // Use this for initialization
 void Start () {
 
 cronometroAviso = 0;
 cronometroCarregamento = 0;
 avisoPortaTrancada = false;
 ativarCarregamento = false;
 Jogador = GameObject.FindWithTag ("Player");
 }
 

 void Update () {
 // SE TENTOU ABRIR A PORTA
 if (Vector3.Distance (Jogador.transform.position, transform.position) <= Distancia && Input.GetKeyDown ("e")) {
 
 for (int x = 0; x < DATA.chaves.Count; x++) {
 if (DATA.chaves [x] == IDdaChave) {
 TemAChave = true;
 }
 }
 if (Trancada == true && TemAChave == false) {
 avisoPortaTrancada = true;
 GetComponent<AudioSource> ().PlayOneShot (audioPortaTrancada);
 } else if (Trancada == true && TemAChave == true) {
 Trancada = false;
 GetComponent<AudioSource> ().PlayOneShot (audioDestrancandoporta);
 
 } else if (Trancada == false) {
 ativarCarregamento = true;
 GetComponent<AudioSource> ().PlayOneShot (audioPortaAbrindo);

 }
 // CRONOMETRO AVISO
 if (avisoPortaTrancada == true) {
 cronometroAviso += Time.deltaTime;
 }
 if (cronometroAviso >= tempoDoAviso) {
 avisoPortaTrancada = false;
 cronometroAviso = 0;

 }
 // CRONOMETRO CAREEGAMENTO
 if (ativarCarregamento == true) {
 cronometroCarregamento += Time.deltaTime;
 }
 if (cronometroCarregamento >= 1) {
 Application.LoadLevel (Nomedacena);
 }
 }
 }
 void OnGUI  () {
 cor.a = cronometroCarregamento;
 GUI.color = cor;
 GUI.DrawTexture (new Rect (0, 0, Screen.width, Screen.height), textura);
 GUI.color = new Color32 (255, 255, 255, 255);

 }
 }
  


Código:
// CRONOMETRO CAREEGAMENTO
 if (ativarCarregamento == true) {
 cronometroCarregamento += Time.deltaTime;
 }
 if (cronometroCarregamento >= 1) {
 Application.LoadLevel (Nomedacena);
 }
quero mudar so essa parte pra que ao envez de dar loadlevel, ele iniciar o script de carregamento pra trocar a cena 

desde ja agradeço a ajuda vlw msm Laughing Laughing :D
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Ter Jan 03, 2017 5:40 pm

Tente isto:

Código:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using System;
[RequireComponent(typeof(AudioSource))]
[Serializable]
public class LoadLevels{

   public Texture texturaFundos;
   public Texture barraDeProgresso;
   public string textoLoad = "Progresso do carregamento:";
   public Color corDoTexto = Color.white;
   public Font Fonte;
   [Space(20)]
   [Range(0.5f,3.0f)]
   public float tamanhoDoTexto = 1.5f;
   [Range(1,10)]
   public int larguraDaBarra = 8;
   [Range(1,10)]
   public int alturaDaBarra = 2;
   [Range(-4.5f,4.5f)]
   public float deslocarBarra = 4;
   [Range(-8,4)]
   public float deslocarTextoX = 2;
   [Range(-4.5f,4.5f)]
   public float deslocarTextoY = 3;
   [HideInInspector]public bool mostrarCarregamento = false;
   [HideInInspector]public int progresso = 0;
}
public class PortaNiveis : MonoBehaviour {
   public Font Fonte;
   public Color cor;
   public bool Trancada;
   public float Distancia = 3;
   public float  tempoDoAviso = 2;
   public string Nomedacena;
   public AudioClip audioPortaAbrindo,audioPortaTrancada,audioDestrancandoporta;
   public Texture textura;
   private bool avisoPortaTrancada,ativarCarregamento;
   public bool TemAChave = false;
   public int IDdaChave;
   private GameObject Jogador;
   private float cronometroAviso,cronometroCarregamento;
   [Space(20)]
   public LoadLevels Carregamento;

   void Start () {
      cronometroAviso = 0;
      cronometroCarregamento = 0;
      avisoPortaTrancada = false;
      ativarCarregamento = false;
      Jogador = GameObject.FindWithTag ("Player");
   }

   void Update () {
      // SE TENTOU ABRIR A PORTA
      if (Vector3.Distance (Jogador.transform.position, transform.position) <= Distancia && Input.GetKeyDown ("e")) {

         for (int x = 0; x < DATA.chaves.Count; x++) {
            if (DATA.chaves [x] == IDdaChave) {
               TemAChave = true;
            }
         }
         if (Trancada == true && TemAChave == false) {
            avisoPortaTrancada = true;
            GetComponent<AudioSource> ().PlayOneShot (audioPortaTrancada);
         } else if (Trancada == true && TemAChave == true) {
            Trancada = false;
            GetComponent<AudioSource> ().PlayOneShot (audioDestrancandoporta);

         } else if (Trancada == false) {
            ativarCarregamento = true;
            GetComponent<AudioSource> ().PlayOneShot (audioPortaAbrindo);

         }
         // CRONOMETRO AVISO
         if (avisoPortaTrancada == true) {
            cronometroAviso += Time.deltaTime;
         }
         if (cronometroAviso >= tempoDoAviso) {
            avisoPortaTrancada = false;
            cronometroAviso = 0;

         }
         // CRONOMETRO CAREEGAMENTO
         if (ativarCarregamento == true) {
            cronometroCarregamento += Time.deltaTime;
         }
         if (cronometroCarregamento >= 1) {
            StartCoroutine(CenaDeCarregamento(Nomedacena));
         }
      }
   }

   IEnumerator CenaDeCarregamento (string cena){
      Carregamento.mostrarCarregamento = true;

      AsyncOperation carregamento = SceneManager.LoadSceneAsync (cena);
      while (!carregamento.isDone) {
         Carregamento.progresso = (int)(carregamento.progress*100);
         yield return null;
      }
   }

   void OnGUI  () {
      if (Carregamento.mostrarCarregamento == false) {
         cor.a = cronometroCarregamento;
         GUI.color = cor;
         GUI.DrawTexture (new Rect (0, 0, Screen.width, Screen.height), textura);
         GUI.color = new Color32 (255, 255, 255, 255);
      }
      else {
         GUI.contentColor = Carregamento.corDoTexto;
         GUI.skin.font = Fonte;
         GUI.skin.label.fontSize = (int)(Screen.height/50*Carregamento.tamanhoDoTexto);
         //TEXTURA DE FUNDO
         GUI.DrawTexture(new Rect(0,0, Screen.width, Screen.height), Carregamento.texturaFundos);

         //TEXTO DE CARREGAMENTO
         float deslocXText = (Screen.height/10)*Carregamento.deslocarTextoX;
         float deslocYText = (Screen.height/10)*Carregamento.deslocarTextoY;
         GUI.Label(new Rect(Screen.width/2 + deslocXText, Screen.height/2 + deslocYText, Screen.width, Screen.height),Carregamento.textoLoad + " " + Carregamento.progresso + "%"); 

         //BARRA DE PROGRESSO
         float largura = Screen.width*(Carregamento.larguraDaBarra/10.0f);
         float altura = Screen.height/50*Carregamento.alturaDaBarra;
         float deslocYBar = (Screen.height/10)*Carregamento.deslocarBarra;
         GUI.DrawTexture(new Rect(Screen.width/2 - largura/2, Screen.height/2 - (altura/2) + deslocYBar, largura*(Carregamento.progresso/100.0f), altura), Carregamento.barraDeProgresso);                                   
      }
   }
}
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Qui Jan 05, 2017 3:46 pm

MarcosSchultz escreveu:Tente isto:

Código:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using System;
[RequireComponent(typeof(AudioSource))]
[Serializable]
public class LoadLevels{

 public Texture texturaFundos;
 public Texture barraDeProgresso;
 public string textoLoad = "Progresso do carregamento:";
 public Color corDoTexto = Color.white;
 public Font Fonte;
 [Space(20)]
 [Range(0.5f,3.0f)]
 public float tamanhoDoTexto = 1.5f;
 [Range(1,10)]
 public int larguraDaBarra = 8;
 [Range(1,10)]
 public int alturaDaBarra = 2;
 [Range(-4.5f,4.5f)]
 public float deslocarBarra = 4;
 [Range(-8,4)]
 public float deslocarTextoX = 2;
 [Range(-4.5f,4.5f)]
 public float deslocarTextoY = 3;
 [HideInInspector]public bool mostrarCarregamento = false;
 [HideInInspector]public int progresso = 0;
}
public class PortaNiveis : MonoBehaviour {
 public Font Fonte;
 public Color cor;
 public bool Trancada;
 public float Distancia = 3;
 public float  tempoDoAviso = 2;
 public string Nomedacena;
 public AudioClip audioPortaAbrindo,audioPortaTrancada,audioDestrancandoporta;
 public Texture textura;
 private bool avisoPortaTrancada,ativarCarregamento;
 public bool TemAChave = false;
 public int IDdaChave;
 private GameObject Jogador;
 private float cronometroAviso,cronometroCarregamento;
 [Space(20)]
 public LoadLevels Carregamento;

 void Start () {
 cronometroAviso = 0;
 cronometroCarregamento = 0;
 avisoPortaTrancada = false;
 ativarCarregamento = false;
 Jogador = GameObject.FindWithTag ("Player");
 }

 void Update () {
 // SE TENTOU ABRIR A PORTA
 if (Vector3.Distance (Jogador.transform.position, transform.position) <= Distancia && Input.GetKeyDown ("e")) {

 for (int x = 0; x < DATA.chaves.Count; x++) {
 if (DATA.chaves [x] == IDdaChave) {
 TemAChave = true;
 }
 }
 if (Trancada == true && TemAChave == false) {
 avisoPortaTrancada = true;
 GetComponent<AudioSource> ().PlayOneShot (audioPortaTrancada);
 } else if (Trancada == true && TemAChave == true) {
 Trancada = false;
 GetComponent<AudioSource> ().PlayOneShot (audioDestrancandoporta);

 } else if (Trancada == false) {
 ativarCarregamento = true;
 GetComponent<AudioSource> ().PlayOneShot (audioPortaAbrindo);

 }
 // CRONOMETRO AVISO
 if (avisoPortaTrancada == true) {
 cronometroAviso += Time.deltaTime;
 }
 if (cronometroAviso >= tempoDoAviso) {
 avisoPortaTrancada = false;
 cronometroAviso = 0;

 }
 // CRONOMETRO CAREEGAMENTO
 if (ativarCarregamento == true) {
 cronometroCarregamento += Time.deltaTime;
 }
 if (cronometroCarregamento >= 1) {
 StartCoroutine(CenaDeCarregamento(Nomedacena));
 }
 }
 }

 IEnumerator CenaDeCarregamento (string cena){
 Carregamento.mostrarCarregamento = true;

 AsyncOperation carregamento = SceneManager.LoadSceneAsync (cena);
 while (!carregamento.isDone) {
 Carregamento.progresso = (int)(carregamento.progress*100);
 yield return null;
 }
 }

 void OnGUI  () {
 if (Carregamento.mostrarCarregamento == false) {
 cor.a = cronometroCarregamento;
 GUI.color = cor;
 GUI.DrawTexture (new Rect (0, 0, Screen.width, Screen.height), textura);
 GUI.color = new Color32 (255, 255, 255, 255);
 }
 else {
 GUI.contentColor = Carregamento.corDoTexto;
 GUI.skin.font = Fonte;
 GUI.skin.label.fontSize = (int)(Screen.height/50*Carregamento.tamanhoDoTexto);
 //TEXTURA DE FUNDO
 GUI.DrawTexture(new Rect(0,0, Screen.width, Screen.height), Carregamento.texturaFundos);

 //TEXTO DE CARREGAMENTO
 float deslocXText = (Screen.height/10)*Carregamento.deslocarTextoX;
 float deslocYText = (Screen.height/10)*Carregamento.deslocarTextoY;
 GUI.Label(new Rect(Screen.width/2 + deslocXText, Screen.height/2 + deslocYText, Screen.width, Screen.height),Carregamento.textoLoad + " " + Carregamento.progresso + "%");  

 //BARRA DE PROGRESSO
 float largura = Screen.width*(Carregamento.larguraDaBarra/10.0f);
 float altura = Screen.height/50*Carregamento.alturaDaBarra;
 float deslocYBar = (Screen.height/10)*Carregamento.deslocarBarra;
 GUI.DrawTexture(new Rect(Screen.width/2 - largura/2, Screen.height/2 - (altura/2) + deslocYBar, largura*(Carregamento.progresso/100.0f), altura), Carregamento.barraDeProgresso);                                    
 }
 }
}
Deu certo mano vlw  Laughing Laughing Laughing   so que de alguma forma quando eu aperto a tecla "E" agr tem que aperta varias e varias vezes para carregar a cena, o que sera que eu fiz de errado :/
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Dom Jan 08, 2017 5:53 pm

Quantas vezes? tem todo o ciclo, se a porta está trancada, aparece aviso. Se está trancada e tem a chave, primeiro ele destranca, depois abre, depois carrega
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Dom Jan 08, 2017 9:27 pm

Tenho que apertar, umas 20 vezes a tecla "e" e o áudio dá porta abrindo se repete cada vez que eu aperto a tecla 
Ja tentei mudar pra Input.GetKey mas não deu certo tb obs eu sei que esse comando, significa apertar e segurar 
Se quiser posso gravar um vídeo e postar no YouTube e marca como não listado daí te dou o link e vc pode ver
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Seg Jan 09, 2017 11:17 am

outro coisa que me recordo e que o aviso da porta trancada aparece mas não some
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Seg Jan 09, 2017 4:31 pm

bymaxbig escreveu:Tenho que apertar, umas 20 vezes a tecla "e" e o áudio dá porta abrindo se repete cada vez que eu aperto a tecla 
Ja tentei mudar pra Input.GetKey mas não deu certo tb obs eu sei que esse comando, significa apertar e segurar 
Se quiser posso gravar um vídeo e postar no YouTube e marca como não listado daí te dou o link e vc pode ver
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Qua Jan 11, 2017 1:10 am

Tente agora:

Código:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using System;
[RequireComponent(typeof(AudioSource))]
[Serializable]
public class LoadLevels{

   public Texture texturaFundos;
   public Texture barraDeProgresso;
   public string textoLoad = "Progresso do carregamento:";
   public Color corDoTexto = Color.white;
   public Font Fonte;
   [Space(20)]
   [Range(0.5f,3.0f)]
   public float tamanhoDoTexto = 1.5f;
   [Range(1,10)]
   public int larguraDaBarra = 8;
   [Range(1,10)]
   public int alturaDaBarra = 2;
   [Range(-4.5f,4.5f)]
   public float deslocarBarra = 4;
   [Range(-8,4)]
   public float deslocarTextoX = 2;
   [Range(-4.5f,4.5f)]
   public float deslocarTextoY = 3;
   [HideInInspector]public bool mostrarCarregamento = false;
   [HideInInspector]public int progresso = 0;
}
public class PortaNiveis : MonoBehaviour {
   public Font Fonte;
   public Color cor;
   public bool Trancada;
   public float Distancia = 3;
   public float  tempoDoAviso = 2;
   public string Nomedacena;
   public AudioClip audioPortaAbrindo,audioPortaTrancada,audioDestrancandoporta;
   public Texture textura;
   private bool avisoPortaTrancada;
   public bool TemAChave = false;
   public int IDdaChave;
   private GameObject Jogador;
   private float cronometroAviso;
   [Space(20)]
   public LoadLevels Carregamento;

   void Start () {
      cronometroAviso = 0;
      avisoPortaTrancada = false;
      Jogador = GameObject.FindWithTag ("Player");
   }

   void Update () {
      // SE TENTOU ABRIR A PORTA
      if (Vector3.Distance (Jogador.transform.position, transform.position) <= Distancia && Input.GetKeyDown ("e")) {
         for (int x = 0; x < DATA.chaves.Count; x++) {
            if (DATA.chaves [x] == IDdaChave) {
               TemAChave = true;
            }
         }
         if (Trancada == true && TemAChave == false) {
            avisoPortaTrancada = true;
            GetComponent<AudioSource> ().PlayOneShot (audioPortaTrancada);
         } else if (Trancada == true && TemAChave == true) {
            Trancada = false;
            GetComponent<AudioSource> ().PlayOneShot (audioDestrancandoporta);

         } else if (Trancada == false) {
            StartCoroutine(CenaDeCarregamento(Nomedacena));
            GetComponent<AudioSource> ().PlayOneShot (audioPortaAbrindo);
         }
      }
      // CRONOMETRO AVISO
      if (avisoPortaTrancada == true) {
         cronometroAviso += Time.deltaTime;
      }
      if (cronometroAviso >= tempoDoAviso) {
         avisoPortaTrancada = false;
         cronometroAviso = 0;
      }
   }

   IEnumerator CenaDeCarregamento (string cena){
      Carregamento.mostrarCarregamento = true;

      AsyncOperation carregamento = SceneManager.LoadSceneAsync (cena);
      while (!carregamento.isDone) {
         Carregamento.progresso = (int)(carregamento.progress*100);
         yield return null;
      }
   }

   void OnGUI  () {
      if (Carregamento.mostrarCarregamento == true) {
         GUI.contentColor = Carregamento.corDoTexto;
         GUI.skin.font = Fonte;
         GUI.skin.label.fontSize = (int)(Screen.height/50*Carregamento.tamanhoDoTexto);
         //TEXTURA DE FUNDO
         GUI.DrawTexture(new Rect(0,0, Screen.width, Screen.height), Carregamento.texturaFundos);

         //TEXTO DE CARREGAMENTO
         float deslocXText = (Screen.height/10)*Carregamento.deslocarTextoX;
         float deslocYText = (Screen.height/10)*Carregamento.deslocarTextoY;
         GUI.Label(new Rect(Screen.width/2 + deslocXText, Screen.height/2 + deslocYText, Screen.width, Screen.height),Carregamento.textoLoad + " " + Carregamento.progresso + "%"); 

         //BARRA DE PROGRESSO
         float largura = Screen.width*(Carregamento.larguraDaBarra/10.0f);
         float altura = Screen.height/50*Carregamento.alturaDaBarra;
         float deslocYBar = (Screen.height/10)*Carregamento.deslocarBarra;
         GUI.DrawTexture(new Rect(Screen.width/2 - largura/2, Screen.height/2 - (altura/2) + deslocYBar, largura*(Carregamento.progresso/100.0f), altura), Carregamento.barraDeProgresso);                                   
      }
   }
}
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Qua Jan 11, 2017 12:35 pm

MarcosSchultz escreveu:Tente agora:

Código:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using System;
[RequireComponent(typeof(AudioSource))]
[Serializable]
public class LoadLevels{

 public Texture texturaFundos;
 public Texture barraDeProgresso;
 public string textoLoad = "Progresso do carregamento:";
 public Color corDoTexto = Color.white;
 public Font Fonte;
 [Space(20)]
 [Range(0.5f,3.0f)]
 public float tamanhoDoTexto = 1.5f;
 [Range(1,10)]
 public int larguraDaBarra = 8;
 [Range(1,10)]
 public int alturaDaBarra = 2;
 [Range(-4.5f,4.5f)]
 public float deslocarBarra = 4;
 [Range(-8,4)]
 public float deslocarTextoX = 2;
 [Range(-4.5f,4.5f)]
 public float deslocarTextoY = 3;
 [HideInInspector]public bool mostrarCarregamento = false;
 [HideInInspector]public int progresso = 0;
}
public class PortaNiveis : MonoBehaviour {
 public Font Fonte;
 public Color cor;
 public bool Trancada;
 public float Distancia = 3;
 public float  tempoDoAviso = 2;
 public string Nomedacena;
 public AudioClip audioPortaAbrindo,audioPortaTrancada,audioDestrancandoporta;
 public Texture textura;
 private bool avisoPortaTrancada;
 public bool TemAChave = false;
 public int IDdaChave;
 private GameObject Jogador;
 private float cronometroAviso;
 [Space(20)]
 public LoadLevels Carregamento;

 void Start () {
 cronometroAviso = 0;
 avisoPortaTrancada = false;
 Jogador = GameObject.FindWithTag ("Player");
 }

 void Update () {
 // SE TENTOU ABRIR A PORTA
 if (Vector3.Distance (Jogador.transform.position, transform.position) <= Distancia && Input.GetKeyDown ("e")) {
 for (int x = 0; x < DATA.chaves.Count; x++) {
 if (DATA.chaves [x] == IDdaChave) {
 TemAChave = true;
 }
 }
 if (Trancada == true && TemAChave == false) {
 avisoPortaTrancada = true;
 GetComponent<AudioSource> ().PlayOneShot (audioPortaTrancada);
 } else if (Trancada == true && TemAChave == true) {
 Trancada = false;
 GetComponent<AudioSource> ().PlayOneShot (audioDestrancandoporta);

 } else if (Trancada == false) {
 StartCoroutine(CenaDeCarregamento(Nomedacena));
 GetComponent<AudioSource> ().PlayOneShot (audioPortaAbrindo);
 }
 }
 // CRONOMETRO AVISO
 if (avisoPortaTrancada == true) {
 cronometroAviso += Time.deltaTime;
 }
 if (cronometroAviso >= tempoDoAviso) {
 avisoPortaTrancada = false;
 cronometroAviso = 0;
 }
 }

 IEnumerator CenaDeCarregamento (string cena){
 Carregamento.mostrarCarregamento = true;

 AsyncOperation carregamento = SceneManager.LoadSceneAsync (cena);
 while (!carregamento.isDone) {
 Carregamento.progresso = (int)(carregamento.progress*100);
 yield return null;
 }
 }

 void OnGUI  () {
 if (Carregamento.mostrarCarregamento == true) {
 GUI.contentColor = Carregamento.corDoTexto;
 GUI.skin.font = Fonte;
 GUI.skin.label.fontSize = (int)(Screen.height/50*Carregamento.tamanhoDoTexto);
 //TEXTURA DE FUNDO
 GUI.DrawTexture(new Rect(0,0, Screen.width, Screen.height), Carregamento.texturaFundos);

 //TEXTO DE CARREGAMENTO
 float deslocXText = (Screen.height/10)*Carregamento.deslocarTextoX;
 float deslocYText = (Screen.height/10)*Carregamento.deslocarTextoY;
 GUI.Label(new Rect(Screen.width/2 + deslocXText, Screen.height/2 + deslocYText, Screen.width, Screen.height),Carregamento.textoLoad + " " + Carregamento.progresso + "%");  

 //BARRA DE PROGRESSO
 float largura = Screen.width*(Carregamento.larguraDaBarra/10.0f);
 float altura = Screen.height/50*Carregamento.alturaDaBarra;
 float deslocYBar = (Screen.height/10)*Carregamento.deslocarBarra;
 GUI.DrawTexture(new Rect(Screen.width/2 - largura/2, Screen.height/2 - (altura/2) + deslocYBar, largura*(Carregamento.progresso/100.0f), altura), Carregamento.barraDeProgresso);                                    
 }
 }
}
aaaaaaaaaaaaeeeeeeeeeeeeewwwwwwwwwwwwwww agora deu certo mas qual era o problema ?
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por MarcosSchultz Sex Jan 13, 2017 7:06 pm

a parte do += Time.deltaTime estava dentro do if de apertar E, então só contava o tempo quando você apartava E
MarcosSchultz
MarcosSchultz
Administrador

Masculino PONTOS : 64727
REPUTAÇÃO : 2650
Idade : 27
Áreas de atuação : Administrador do fórum
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 Aad8pUi

https://www.schultzgames.com

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por bymaxbig Sex Jan 13, 2017 9:13 pm

A sim entendi vlw brother me ajudou muito...
bymaxbig
bymaxbig
Membro
Membro

Masculino PONTOS : 3016
REPUTAÇÃO : 5
Idade : 24
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por raulframos Sex Set 22, 2017 3:47 pm

Como eu faço para clicar em qualquer lugar da tela de um celular para executar o carregamento?
Não sou muito bom com programação. Me ajudem por favor!
Se houver uma boa alma disposta a me ajudar me adicione o whatsapp por favor. 11 984410809
Prometo não ser inconveniente.

raulframos
Iniciante
Iniciante

PONTOS : 2384
REPUTAÇÃO : 0
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por g Sex Set 22, 2017 3:59 pm

raulframos escreveu:Como eu faço para clicar em qualquer lugar da tela de um celular para executar o carregamento?
Não sou muito bom com programação. Me ajudem por favor!
Se houver uma boa alma disposta a me ajudar me adicione o whatsapp por favor. 11 984410809
Prometo não ser inconveniente.

Vc que um botão pra cancelar o carregamento é isso
g
g
Membro
Membro

Masculino PONTOS : 2629
REPUTAÇÃO : 15
Áreas de atuação : Iniciante em C#, Modelagem,Qualquer coisa
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por raulframos Sex Set 22, 2017 4:14 pm

g escreveu:
raulframos escreveu:Como eu faço para clicar em qualquer lugar da tela de um celular para executar o carregamento?
Não sou muito bom com programação. Me ajudem por favor!
Se houver uma boa alma disposta a me ajudar me adicione o whatsapp por favor. 11 984410809
Prometo não ser inconveniente.

Vc que um botão pra cancelar o carregamento é isso
Boa Tarde g.
Gostaria de fazer uma mensagem de aviso em que se tem um alerta para o usuário. Nela vai conter um texto como, para concordar, clique em qualquer lugar da tela para carregar uma segunda sena. 
com este script funcionou perfeitamente com a barra de espaço.
Gostaria de, ao clicar na tela, execute a mesma ação.

raulframos
Iniciante
Iniciante

PONTOS : 2384
REPUTAÇÃO : 0
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por g Sex Set 22, 2017 5:53 pm

Adicione na essas linha de codigo no script loading pode ser no final



Código:
public void ChamarCena () {[size=14][/size] [size=14][/size] StartCoroutine(CenaDeCarregamento(cenaACarregar));[size=14][/size][size=14][/size] }

depois crie um novo botão e link o objeto q esta o script e coloque pra chamar a cena pelo botão
g
g
Membro
Membro

Masculino PONTOS : 2629
REPUTAÇÃO : 15
Áreas de atuação : Iniciante em C#, Modelagem,Qualquer coisa
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por g Sex Set 22, 2017 5:55 pm

g escreveu:Adicione na essas linha de codigo no script loading pode ser no final



Código:
public void ChamarCena () {[size=14][/size] [size=14][/size] StartCoroutine(CenaDeCarregamento(cenaACarregar));[size=14][/size][size=14][/size] }

depois crie um novo botão e link o objeto q esta o script e coloque pra chamar a cena pelo botão

Aqui saiu estranho ai em cima

Código:
   public void ChamarCena () {
      
      StartCoroutine(CenaDeCarregamento(cenaACarregar));
      
   }
g
g
Membro
Membro

Masculino PONTOS : 2629
REPUTAÇÃO : 15
Áreas de atuação : Iniciante em C#, Modelagem,Qualquer coisa
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por raulframos Sex Set 22, 2017 6:57 pm

g escreveu:
g escreveu:Adicione na essas linha de codigo no script loading pode ser no final



Código:
public void ChamarCena () {[size=14][/size] [size=14][/size] StartCoroutine(CenaDeCarregamento(cenaACarregar));[size=14][/size][size=14][/size] }

depois crie um novo botão e link o objeto q esta o script e coloque pra chamar a cena pelo botão

Aqui saiu estranho ai em cima

Código:
 public void ChamarCena () {
 
 StartCoroutine(CenaDeCarregamento(cenaACarregar));
 
 }
Meu amigo... Deu muito certo. OBRIGADO!
Sem precisar de um rim ou algo assim me procure.  :D :D :D :D :D

raulframos
Iniciante
Iniciante

PONTOS : 2384
REPUTAÇÃO : 0
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por Manito01 Sáb Nov 30, 2019 5:52 pm

Marcos, estou com um problema, pois no meu jogo, quando o usuario clicar em Jogar, vai aparecer a cena de carregamento e depois vai pro jogo, mas quando boto o seu script da aula na cena de carregamento, quando o usuario bota em jogar a cena de carregamento aparece muito rapido e dai ja pula pro jogo, e não estou conseguindo resolver isso! Desde já, grato!

Manito01
Iniciante
Iniciante

PONTOS : 1572
REPUTAÇÃO : 0
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

TUTORIAL Re: [TUTORIAL] Como fazer uma Barra de Loading na Unity 5

Mensagem por Derick Riedel Seg maio 04, 2020 5:57 am

Mano ajudou muito no meu projeto aqui valeu pelo código mano continua o que vc faz velho curti mt seus vídeos só tenho agradecer mano tmj!!!

Derick Riedel
Iniciante
Iniciante

PONTOS : 1416
REPUTAÇÃO : 0
Respeito as regras : [TUTORIAL] Como fazer uma Barra de Loading na Unity 5 - Página 2 WvDYdlf

Ir para o topo Ir para baixo

Página 2 de 2 Anterior  1, 2

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos