Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - huminaboz

Pages: [1]
1
Support / Re: Collider Issue in 4.3
« on: January 10, 2016, 12:31:40 am »
Thanks Kreso22, this fixed my problem.

2
Support / Re: Need help thinking about GUI
« on: July 08, 2014, 08:30:51 am »
Oh my... I have a long way to go.

Thanks for your help!

3
Support / Re: Need help thinking about GUI
« on: July 07, 2014, 09:30:02 am »
Amazing, you've solved two of my major reoccurring problems from the past few months, I should have asked sooner. Such a quick response too, thanks sir!

But (of course) now there's a new problem:
What if I want to control the button as a child of a parent GameObject? Say I instantiate the entire GUI interface at once with several buttons as child objects. Is there a way to control those individual buttons? Or do I need to instantiate each button separately?

I did thisGameGUIHolder = Instantiate(GameGUIHolder, Vector3.zero, Quaternion.identity) as GameObject;
Instead of thisPauseBtn = Instantiate(PauseBtn, Vector3.zero, Quaternion.identity) as tk2dUIItem;

I fumbled around for a couple of hours trying to find some way to make thisPauseBtn = GameGUIHolder/PauseBtn to no success.

4
Support / Need help thinking about GUI
« on: July 06, 2014, 02:26:40 am »
I could use a little help thinking about the GUI.

First, are there any recommended best practice tips hiding behind a link somewhere?

Next, more specific questions:
1. Hypothetical situation: you're in a game screen and you hit the pause button. A menu appears with "keep playing" and "exit game" buttons. How should I create this menu? Right now I have it in an off-screen location and make it appear in view when the pause button is pressed. Is there a smarter way to go about this? I've tried enable/disable but every time I try that it seems to elude me because a disabled object doesn't seem to respond to enabling.

2. Buttons. These guys are driving me crazy. So far as I can tell, I have to create button prefabs, drag them into the scene, and control them via a script on a single object (like an empty 'GUI Manager' game object). Here's the script I use on the GUIManager:

Code: [Select]
public tk2dUIItem PauseBtn;

void OnEnable()
{
if (PauseBtn) {PauseBtn.OnClick += PauseMenu;}
}

I feel like this method requires a lot of duplication of work across several scenes.

This issue probably relates to Unity itself as much as TK2D in that I would like to know how to programatically create these buttons without dragging them to the scene. (I usually end up instantiating and object and not being able to control the clone).
 
Alternatively, I've tried putting the button control script on the buttons themselves, but this seems to make it harder to control functions across other scripts, which is what led me to the GUI Manager solution. What would you recommend?

3. What is void OnDisable() used for?

Thanks for insight on any of these questions!

Disclaimer: I have a little under 2 years programming experience, am self-taught, and this is the first time I've tried asking a question - please pardon my computer science ignorance :/

5
Showcase / Re: Lone Ghost & Cat - My first Game Ever! [Web Game]
« on: July 04, 2014, 10:11:46 am »
Wow, I saw your videos on YouTube a year or so back, great to see you've made progress since then! Looks great!

Pages: [1]