Indonesia Unity3D Game Developing
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Game Mewarnai Tutorial
[ASK] Integrasi Scene EmptyThu Mar 23, 2017 10:21 am by kamil

» [ASK HELP] Slide informasi di augmented reality
[ASK] Integrasi Scene EmptyTue Jan 03, 2017 8:58 pm by Briyan_ap

» ASK cara klik dan memunculkan informasi
[ASK] Integrasi Scene EmptyTue Jan 03, 2017 8:54 pm by Briyan_ap

» [Ask] mengubah game PC menjadi game Android
[ASK] Integrasi Scene EmptyTue Jan 03, 2017 10:57 am by NiethaChan

» Virtualisasi suatu Gedung mengunakan unity3D + google seketchUP
[ASK] Integrasi Scene EmptySat Dec 31, 2016 1:06 am by zeepank

» Minta Tolong, slideshow ngga muncul saat object di klik
[ASK] Integrasi Scene EmptyTue Dec 27, 2016 12:53 pm by Briyan_ap

» tolong dong lagi bikin button rotate tp button ga keluar
[ASK] Integrasi Scene EmptyWed Dec 21, 2016 1:15 pm by Lita Misae

» algoritma Minimax/negascout buat checkers
[ASK] Integrasi Scene EmptyWed Nov 30, 2016 1:51 am by ardiansa

» screenshot
[ASK] Integrasi Scene EmptyWed Nov 16, 2016 10:15 pm by azhari

Statistic

[ASK] Integrasi Scene

2 posters

Go down

[ASK] Integrasi Scene Empty [ASK] Integrasi Scene

Post  akbarpuryanto Sun Mar 15, 2015 10:05 pm

permisi agan agan mau nanya.. saya punya 3 scene. misal tombol di scene 1 di klik maka akan masuk ke scene 2, dan ketika tombol di scene 2 di klik maka masuk scene 3. masalahnya pas tombol di scene 1 di klik masuk di scene 2 tapi otomatis pindah ke scene 3. gimana ya caranya biar ngga otomatis pindah ke scene 3.
mohon bantuannya agan agan
akbarpuryanto
akbarpuryanto
Unity3D Newbie
Unity3D Newbie

Posts : 6
Points : 10
Reputation : 0
Join date : 2015-03-02

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  ahmad irfan Mon Mar 16, 2015 12:18 am

bisa liat scriptnya gan..? barangkali ada yg salah dengan logika pemrogramannya.
ahmad irfan
ahmad irfan
Unity3D Newbie
Unity3D Newbie

Posts : 17
Points : 29
Reputation : 6
Join date : 2015-01-22
Age : 32
Location : Kota Tangerang

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  akbarpuryanto Mon Mar 16, 2015 5:35 am

ahmad irfan wrote:bisa liat scriptnya gan..? barangkali ada yg salah dengan logika pemrogramannya.  

ini gan, script di scene 1
using UnityEngine;
using System.Collections;

public class Menu : MonoBehaviour, IButtonListener   {

//variable button
private Button buttonStart, buttonPanduan, buttonExit;




void Start() {
buttonStart = this.transform.FindChild("buttonStart").GetComponent<Button>();
buttonPanduan = this.transform.FindChild("buttonPanduan").GetComponent<Button>();
buttonExit = this.transform.FindChild("buttonExit").GetComponent<Button>();

buttonStart.RegisterListener(this);
buttonPanduan.RegisterListener(this);
buttonExit.RegisterListener(this);
}

public void OnButtonStateChange(Button changedButton, int buttonPhaseId) {
if (changedButton == buttonStart) {
Application.LoadLevel("menudua");
}

if(changedButton == buttonPanduan) {
Application.LoadLevel("panduan");
}
if (changedButton == buttonExit) {
Application.Quit();
}
}

void OnGUI(){

}
}


Last edited by akbarpuryanto on Mon Mar 16, 2015 5:40 am; edited 1 time in total
akbarpuryanto
akbarpuryanto
Unity3D Newbie
Unity3D Newbie

Posts : 6
Points : 10
Reputation : 0
Join date : 2015-03-02

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  akbarpuryanto Mon Mar 16, 2015 5:38 am

ahmad irfan wrote:bisa liat scriptnya gan..? barangkali ada yg salah dengan logika pemrogramannya.  

kalo yg ini di script scene 2 nya
using UnityEngine;
using System.Collections;

public class MenuDua : MonoBehaviour, IButtonListener {

//variable button
private Button btnBack, btnPerawatan, btnProduk;




void Start() {
btnBack = this.transform.FindChild("btnBack").GetComponent<Button>();
btnPerawatan = this.transform.FindChild("btnPerawatan").GetComponent<Button>();
btnProduk = this.transform.FindChild("btnProduk").GetComponent<Button>();

btnBack.RegisterListener(this);
btnPerawatan.RegisterListener(this);
btnProduk.RegisterListener(this);
}

public void OnButtonStateChange(Button changedButton, int buttonPhaseId) {
if (changedButton == btnBack) {
Application.LoadLevel("gamemenu");
}

if(changedButton == btnPerawatan) {
Application.LoadLevel("perawatan");
}
if (changedButton == btnProduk) {
Application.LoadLevel("produk");
}
}

void OnGUI(){

}
}
akbarpuryanto
akbarpuryanto
Unity3D Newbie
Unity3D Newbie

Posts : 6
Points : 10
Reputation : 0
Join date : 2015-03-02

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  ahmad irfan Mon Mar 16, 2015 11:15 pm

mmm pakai ibuttonlistener y. maaf sya blm pernah coba pakai script itu. tpi saya punya alternatif script lain. script ini saya dapat dari Brent Farris barangkali bisa membantu.

using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class ButtonMenuBelajar : MonoBehaviour {

public Rect button = new Rect (15,15,200,110); // ini untuk customize posisi dan size button
public string buttonLabel = "Load Level"; // ini untuk text labelnya.
public string levelToLoad = "Menu"; // ini untuk judul scene yang mau kamu tuju / load.

private void OnGUI ()
{
if (GUI.Button(button, buttonLabel))
Application.LoadLevel(levelToLoad);
}
}
ahmad irfan
ahmad irfan
Unity3D Newbie
Unity3D Newbie

Posts : 17
Points : 29
Reputation : 6
Join date : 2015-01-22
Age : 32
Location : Kota Tangerang

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  akbarpuryanto Tue Mar 17, 2015 10:47 am

ahmad irfan wrote:mmm pakai ibuttonlistener y. maaf sya blm pernah coba pakai script itu. tpi saya punya alternatif script lain. script ini saya dapat dari Brent Farris barangkali bisa membantu.

using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class ButtonMenuBelajar : MonoBehaviour {

public Rect button = new Rect (15,15,200,110); // ini untuk customize posisi dan size button
public string buttonLabel = "Load Level"; // ini untuk text labelnya.
public string levelToLoad = "Menu"; // ini untuk judul scene yang mau kamu tuju / load.

private void OnGUI ()
{
if (GUI.Button(button, buttonLabel))
Application.LoadLevel(levelToLoad);
}
}

makasih banget gan Very Happy Very Happy .. tapi biar tiap button ada texturenya gmna ya gan scriptnya? biar ngga polos
akbarpuryanto
akbarpuryanto
Unity3D Newbie
Unity3D Newbie

Posts : 6
Points : 10
Reputation : 0
Join date : 2015-03-02

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  ahmad irfan Tue Mar 17, 2015 11:40 am

untuk pemberian texturenya agan bsa liat di video ini.

https://www.youtube.com/watch?v=kNsD90Gjs-g

beberapa script perlu diperhatikan untuk bsa berinteraksi satu dengan yang lainnya. pasti bsa. smngat..! Cool
ahmad irfan
ahmad irfan
Unity3D Newbie
Unity3D Newbie

Posts : 17
Points : 29
Reputation : 6
Join date : 2015-01-22
Age : 32
Location : Kota Tangerang

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  akbarpuryanto Tue Mar 17, 2015 1:37 pm

ahmad irfan wrote:untuk pemberian texturenya agan bsa liat di video ini.

https://www.youtube.com/watch?v=kNsD90Gjs-g

beberapa script perlu diperhatikan untuk bsa berinteraksi satu dengan yang lainnya. pasti bsa. smngat..! Cool

siapp gan, mksih banyak gan Very Happy
akbarpuryanto
akbarpuryanto
Unity3D Newbie
Unity3D Newbie

Posts : 6
Points : 10
Reputation : 0
Join date : 2015-03-02

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  ahmad irfan Tue Mar 17, 2015 4:23 pm

SAMA2 Very Happy
ahmad irfan
ahmad irfan
Unity3D Newbie
Unity3D Newbie

Posts : 17
Points : 29
Reputation : 6
Join date : 2015-01-22
Age : 32
Location : Kota Tangerang

Back to top Go down

[ASK] Integrasi Scene Empty Re: [ASK] Integrasi Scene

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum