Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Game Mewarnai Tutorial
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyThu Mar 23, 2017 10:21 am by kamil

» [ASK HELP] Slide informasi di augmented reality
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyTue Jan 03, 2017 8:58 pm by Briyan_ap

» ASK cara klik dan memunculkan informasi
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyTue Jan 03, 2017 8:54 pm by Briyan_ap

» [Ask] mengubah game PC menjadi game Android
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyTue Jan 03, 2017 10:57 am by NiethaChan

» Virtualisasi suatu Gedung mengunakan unity3D + google seketchUP
Minta Tolong,  slideshow ngga muncul saat object di klik EmptySat Dec 31, 2016 1:06 am by zeepank

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

» tolong dong lagi bikin button rotate tp button ga keluar
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyWed Dec 21, 2016 1:15 pm by Lita Misae

» algoritma Minimax/negascout buat checkers
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyWed Nov 30, 2016 1:51 am by ardiansa

» screenshot
Minta Tolong,  slideshow ngga muncul saat object di klik EmptyWed Nov 16, 2016 10:15 pm by azhari

Statistic

Minta Tolong, slideshow ngga muncul saat object di klik

Go down

Minta Tolong,  slideshow ngga muncul saat object di klik Empty Minta Tolong, slideshow ngga muncul saat object di klik

Post  Briyan_ap on Tue Dec 27, 2016 12:53 pm

Maaf mau tanya master,

Niatnya mau bikin tombol di klik terus muncul slide info ky gambar ini :

[You must be registered and logged in to see this link.]

Terus Scriptnya begini :

Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InfoKlik : MonoBehaviour {

 public Transform target1 ;
 public Texture gambar1,gambar2,gambar3 ;
 public string info1,info2,info3;
 public Vector2 scrollposition1 = Vector2.zero;
 public bool show = false;

 void update() {
 if(Input.GetMouseButton(0)) {
 Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
 RaycastHit hit;
 if(Physics.Raycast(ray, out hit)) {
 if(hit.transform == target1) {
 show=true;
 }
 }
 }
 }


 void OnGui () {
 if(show==true) {
 GUI.BeginGroup (new Rect (Screen.width / 2 - 200, Screen.height / 2 - 250, 800, 500));
 GUI.Box (new Rect (0, 50, 405, 360), "informasi");

 scrollposition1 = GUI.BeginScrollView(new Rect(30,0,350,390),scrollposition1,new Rect(0,0,1150,200));

 GUI.DrawTexture (new Rect(0,90,350,210),gambar1);
 info1 = GUI.TextArea(new Rect(0,300,350,50),info1,200);

 GUI.DrawTexture (new Rect(400,90,350,210),gambar2);
 info2 = GUI.TextArea(new Rect(400,300,350,50),info2,200);

 GUI.DrawTexture (new Rect(800,90,350,210),gambar3);
 info3 = GUI.TextArea(new Rect(800,300,350,50),info3,200);

 GUI.EndScrollView();
 GUI.EndGroup();

 }
 }




}


Code tadi  dicopy ke ARCamera dan model yang buat di klik dimasukan ke target1 :
[You must be registered and logged in to see this link.]

Setelah di Test objek tadi di klik tapi slideshow ngga keluar....
[You must be registered and logged in to see this link.]

Mohon Bantuannya.... Terimakasih.
Briyan_ap
Briyan_ap
Unity3D Newbie
Unity3D Newbie

Posts : 3
Points : 7
Reputation : 0
Join date : 2016-12-27

Back to top Go down

Back to top


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