1
NGUI 3 Support / A few questions
« on: July 22, 2014, 01:24:23 PM »
Hello everyone,
A little about my company and myself before I begin:
The name of our company is FireCreation. We are a small group of 18 people. We are obviously using Unity to build our first game for retail use.
I am 32 years old. I am the lead code designer as well as our company's CEO. I have years of experience with C++, LUA, HTML1, and HEX. I started modifying an old game called Marathon, Marathon 2, and Marathon Infinity(in HEX). Followed by Unreal(the first Unreal) and Unreal Tournament(A forum of C++). Then I moved on to Arma, Arma 2, Arma 2 Operation Arrowhead, DayZ the mod, and the mod Domination 2(Arma is C++ oriented). I then turned my sights onto modding Rust(LUA via Oxide). Now I am working with C# in Unity. Even though I might know a great deal of C# I still do not know everything.
I have a few questions, some might have already been asked. Some I might find by the time someone answers them. I want to say sorry in advance for any duplicate questions that someone has already asked. I also want to say sorry for questions that might be obvious to a seasoned coder in C#. I am still learning some of it's advance capabilities. I am also watching all the tutorial videos that these fine people here have made for us. Sadly not only do I have to take care of my company, but I have a wife and an 11th month old that demands quite a bit of my time. So I watch those amazing videos when when I have time.
Now for my questions:
I am using a State Machine for our game. I also created a preliminary UI system before I bought NGUI (I am attaching it to this thread, anyone can use it if they need although with NGUI it has become moot). What I am trying to do is get a UI to come up when the user looks at the item in question. I had it working with my little UI script. I have RayCast always on(another script) and I also got it to read when nothing is being 'hit'. So what I am asking is how would I get NGUI to have text come up on the user's screen when RayCast hits a specific item?
I am also using a State Machine to have persistent terrain, items, etc. So how would I add the main menu to what I already have? As of right now I have every item(gameobjects, scripts, the State Machine itself, etc) attach itself to an empty gameobject. I tried to attach the 'Control - Background' to this gameobject but I get an error. The UI Root does not child itself to the gameobject but the 'Control - Background' does. I know I am going to need the UI Root for the entire game. How would I go about Getting the UI Root to be persistent through the loading of each scene with my State Machine(child it to the empty gameobject like the Control - Background)? I have thought of making the UI Root replace the empty gameobject and attach everything to the UI Root. Yet before I rip that apart I was hoping to get a few ideas, if any.
There will be more questions to come as I watch more of the tutorials. I will use this same thread to ask them when they arise. I want to thank everyone in advance for even taking the time to read this. I also want to thank the Developers of NGUI. You guys are awesome! Your application will cut my development time in half. The one thing I have noticed with new indie game developers now a days, is they might be pushing out games with amazing gameplay but they forget to have something as basic as a comprehensive UI. To me the UI is just as important as gameplay. It is the first thing you see when the user loads into the game.
So again thank you for your hard work, you have gained an avid supporter!
A little about my company and myself before I begin:
The name of our company is FireCreation. We are a small group of 18 people. We are obviously using Unity to build our first game for retail use.
I am 32 years old. I am the lead code designer as well as our company's CEO. I have years of experience with C++, LUA, HTML1, and HEX. I started modifying an old game called Marathon, Marathon 2, and Marathon Infinity(in HEX). Followed by Unreal(the first Unreal) and Unreal Tournament(A forum of C++). Then I moved on to Arma, Arma 2, Arma 2 Operation Arrowhead, DayZ the mod, and the mod Domination 2(Arma is C++ oriented). I then turned my sights onto modding Rust(LUA via Oxide). Now I am working with C# in Unity. Even though I might know a great deal of C# I still do not know everything.
I have a few questions, some might have already been asked. Some I might find by the time someone answers them. I want to say sorry in advance for any duplicate questions that someone has already asked. I also want to say sorry for questions that might be obvious to a seasoned coder in C#. I am still learning some of it's advance capabilities. I am also watching all the tutorial videos that these fine people here have made for us. Sadly not only do I have to take care of my company, but I have a wife and an 11th month old that demands quite a bit of my time. So I watch those amazing videos when when I have time.
Now for my questions:
I am using a State Machine for our game. I also created a preliminary UI system before I bought NGUI (I am attaching it to this thread, anyone can use it if they need although with NGUI it has become moot). What I am trying to do is get a UI to come up when the user looks at the item in question. I had it working with my little UI script. I have RayCast always on(another script) and I also got it to read when nothing is being 'hit'. So what I am asking is how would I get NGUI to have text come up on the user's screen when RayCast hits a specific item?
I am also using a State Machine to have persistent terrain, items, etc. So how would I add the main menu to what I already have? As of right now I have every item(gameobjects, scripts, the State Machine itself, etc) attach itself to an empty gameobject. I tried to attach the 'Control - Background' to this gameobject but I get an error. The UI Root does not child itself to the gameobject but the 'Control - Background' does. I know I am going to need the UI Root for the entire game. How would I go about Getting the UI Root to be persistent through the loading of each scene with my State Machine(child it to the empty gameobject like the Control - Background)? I have thought of making the UI Root replace the empty gameobject and attach everything to the UI Root. Yet before I rip that apart I was hoping to get a few ideas, if any.
There will be more questions to come as I watch more of the tutorials. I will use this same thread to ask them when they arise. I want to thank everyone in advance for even taking the time to read this. I also want to thank the Developers of NGUI. You guys are awesome! Your application will cut my development time in half. The one thing I have noticed with new indie game developers now a days, is they might be pushing out games with amazing gameplay but they forget to have something as basic as a comprehensive UI. To me the UI is just as important as gameplay. It is the first thing you see when the user loads into the game.
So again thank you for your hard work, you have gained an avid supporter!