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.


Topics - yo_milo

Pages: [1]
1
NGUI 3 Support / [Solved] Ngui Root shrinks after async loading...
« on: October 06, 2017, 11:14:22 AM »
Ngui Root shrinks after async loading and it breaks all my anchors. I do not have any other code to modify the Root's size.

Could it be happening because the Loading has it's own root , which gets destroyed, and the "Level selection" has its own NGUI Root as well?

https://youtu.be/LjiFYA56aSw

It does not happen when I load the "Level selection first" and then I pass to a loading screen.

Edit 1:
I guess what is breaking my stuff is having two 2D UI Roots at the same time and destroying one of them (Because of the loading Async). Do any of you have suggestions on how to solve this?

Edit 2:
I am getting closer to the answer, it is really due to the double 2D UI Root. The camera gets cached by the roots... When the UICamera from the loading gets killed, which nulls the references and makes my anchors change in size to 2w, 2h.

2
NGUI 3 Support / [Solved] Recommendation on how set up my NGUI Root
« on: October 02, 2017, 07:04:16 PM »
Greetings.
I have been struggling on a good way to set up my NGUI Roots.
 I used to have an NGUIRoot prefab, but when it comes to the moment of adding other components, things get "shaky".

Additionally, lately I have found some elements I need to reuse in my main menu and in my levels, which cause this huge struggle because the "Levels" UI is a prefab, and if I nest other prefabs, then I will break the link to the original one.

This is not like a "This is the right answer" kind of question, I was wondering... What would you suggest, fellow devs?

These are the solutions I believe they could work:
> Adding all the needed UI in every place in One centralized prefab, set up any other needed stuff with code as needed. The root would not destroy on load.
> Saving all the elements in Panel prefabs and spawning them as needed on demand, Root could be a another prefab, spawned as needed.

Any suggestions?

3
NGUI 3 Support / UIProgress bar position at x value
« on: April 27, 2017, 12:50:07 PM »
Greetings.

I was wondering if is there any convenience method to get either the local position or the world position of where a UIFillbar would be at t value.

This is because in my game I set a minimum percentage to win, and I want to get it on start, move the sprite that marks that percent, to whatever value it would be on my fillbar.

Because, I could hack it by having the sprite childed to the thumb, setting the value to t, unchilding the line at that position, then moving the value back to 0, but I think that is not the right way to do it.

4
TNet 3 Support / New TNET Project
« on: August 17, 2015, 04:24:22 PM »
My last TNet project was a huge success. (Thank you Aren...)

However; it was a WLAN game, so, I did not have to worry about servers at all.

But now, I want to try doing something to be played online. I see a lot that you mention Amazon EC2 server as a hosting solution. I would like to know, what should I look for in a server in order to have a game using TNET working on it. The load should not be too much, yet; it should be stable.

I am asking this, because we might get a Server to host our own leaderboards (We are not using neither Play Services, or Game Center) using PHP, and we would like to kill two birds with one stone. Is there anything specific I should look for in order to run TNET on the server?

Or, am I getting all tangled up?

5
TNet 3 Support / [HELP] Game running on local WAN?
« on: July 12, 2015, 01:12:29 PM »
Hello... I am almost done with my first TNET App...

However, I have this problem...
The app is supposed to be used at a conference, most likely a hotel room; therefore, the networks are not to be trusted... So, in order to avoid having problems with the network, I thought creating an Ad Hoc network, and everyone connecting to it would be my solution.

However, I cannot connect to my server on an Ad Hoc network... Is it possible?
This is what I am currently Doing, neither the TNET example, nor my app connects.

First I create my network in my MAC


Then I run my server using mono


Then I connect to the network.
Then I run the app... The example cannot find any servers to join... Of course I can join using localhost, but then again, iPads aren't able to connect.


Both in the example, and in my app, I keep getting this error.


And I cannot create new Servers, because a server is already running (Also, because I do not need to).




What is my best choice in order to make my game work in Unknown networks? It is supposed to be a WAN game.  Will I be able to run without internet connection, Will I be able to run it in an Ad Hoc Network?
Should I use a router? I am sorry this might be a little bit out of the scope of TNET... But I would really appreciate your help.

6
TNet 3 Support / Approaching my first Tnet Project [Suggestions]?
« on: June 30, 2015, 01:44:11 PM »
I am about to start a project with Tnet.

I am wondering if I am moving on the right track using TNET... If I understand the high concept of it.

It is a "simple" (Quotes, because I have never done network code before) quiz game.
Long story short, every player "races" answering quizz questions, and the host is a display of the players┬┤ information (like top 5 racers, race time, a display of the track, etc); it is only played on LAN.


So, my question are...

First step would be, everyone joining the same Address, right?
  1. TNManager.Connect(ent.internalAddress, ent.internalAddress);

And then, if there were to be many simultaneous races, each race would be a separate channel, right?
Because I need one host per race, because, at least in the logic I have been thinking... The host would have the display, and the clients would "play". That is what I did for my prototype using unity┬┤s standard networking.
Edit: The answer is, yes, every race would be a separate channel.

The first person to join a channel is designated as that channel's host. Think "Operator" in IRC. Same concept. Only one player can be a channel's "host" and when the host player leaves, another one is automatically chosen.


But then... I have a problem... I was reading the thread "Using a Smartphone as a gamepad via TNet ?", and it states that two different scenes cannot have the same channel.
No. Same channel means same scene. You can still send RFCs via private messages to players elsewhere, however.


Also, Aren does not recommend (in that case, the joypads and the "view screen") sharing scenes.

I don't recommend you having them share a scene. You don't need the whole scene to send data. tno.Send with Target.Broadcast will send it to everyone. tno.Send with a player target will send a private message to that player. Either way, no need to be inside the same channel to send data. Just make sure that both places have the same TNObject ID / script.

So, I am kind of confused on how to proceed here.

(In my prototype, I really have a class in the hosts that handles the data, whom is in a separate scene, and each player plays the questionnaire scene, but they never meet each other.)


Other than that, I feel like syncing the data and displaying it should be easy, because all the data I need to send to the clients are the questions, and the clients send back their answers... based on those answers, the host processes the data and displays at the main screen.

I will also attach some pics of the prototype, so you get an Idea of what I am doing.

Main screen



Host Screen



Client Screen

7
NGUI 3 Support / Radial scrollview
« on: April 27, 2015, 12:29:11 PM »
Hello, I am trying to do a Radial Scrollview...

I know codewise, what to do to position my buttons (objects.transform.localPosition = new Vector3( distanceToCenter * Mathf.Cos(i * angleBetweenObjects), distanceToCenter * Mathf.Sin( i * angleBetweenObjects)); ) , and how to keep my buttons always pointing up (inverting the localeuler angle of the parent); however, I want to implement it as a scroll view... or at least be able to use the gesture recognition available in the scroll view...

How should I approach this? (I am reading scroll view class at the moment).

Is it more advisable to create a new class that inherits scroll view?
Create a copy of scroll view and create my new class based on that (I think not)
Or modify scrollview?

EDIT:
So far, the greatest contenders for movement are MoveAbsolute and MoveRelative, I am going to experiment a little bit.

8
NGUI 3 Support / [FIXED] NGUI Vuforia Button on target
« on: February 26, 2015, 06:12:19 PM »
Note: This message is awaiting approval by a moderator.
EDIT:I kept working on it, and I did reset my hierarchy kind of like in the picture, and the touch input did work. I was wondering, how do you guys set up your 3D GUIs with Vuforia?

EDIT 2: I Uploaded my hierarchy so you can see how I did it. I had to rotate my UIRoot (the script is disabled, thou).


This is kind of a follow up to this thread:
http://www.tasharen.com/forum/index.php?topic=5825.0

I am trying to do a Vuforia Target with NGUI buttons, so I can interact with those objects.

As you can see, I attached my hierarchy.
I have a 3D GUI inside of my Target object, but the GUI has the root (which resizes) disabled.
My GUI camera is childed to the ARCamera, and it has the "http://www.tasharen.com/forum/index.php?action=dlattach;topic=5825.0;attach=2677CopyProjectionMatrix.cs" script attached to it, pointing to the ARCamera.

The GUI detects the mouse hover, and it moves along the target rotation; however, it does not detect on click, any of you have any idea why?

9
Misc Archive / Surprised that NGUI does not have a "Tween Value"
« on: October 22, 2014, 05:37:43 PM »
I dunno, I just find it interesting...
Not like it is impossible to do... Just commenting.  ::)

10
NGUI 3 Support / Has anyone used MegaBook and NGUI together?
« on: October 16, 2014, 06:35:31 PM »
I am having a hard time making my NGUI stuff appear in my book :(

11
NGUI 3 Support / [solved] UISounds overlapping
« on: August 19, 2014, 05:32:18 PM »
Hello...

I have this problem, that, when I spam clicking a button, the sounds it produces overlap; this is very annoying because I have sounds that are up to 4 seconds long.

I was looking through the code, and I realized that at the end, UIPlayButton calls NGUITools.PlaySound(), and it does a PlayOneShot(Audioclip, volume).
If I want to fix this sound spamming problem, what approach would you recommend me? (or would you do it?)


Because, one thing I could do, is instead of using the NGUI's scripts, I could just have a "Sound manager" with an Audiosource, and just check if the Audiosource is not playing, and if it not, it can play a new sound... But I was hoping there was a "NGUI" based solution for my problem, because otherwise I would have to restructure a few things...

As I told you, I know a few ways around it, but Ideally, It would love you have an NGUI based solution...

12
NGUI 3 Support / [solved]Problem drag components
« on: August 07, 2014, 01:46:09 PM »
Hey, Hello.

I do not usually post here... But recently, I wanted to use the Drag components from NGUI, and they do not seem to work properly for me.

At first, I just created a Sprite, added a box collider, and slapped in UIDragObject, and tried it out.

If I have Keep Visible off, it behaves properly; however, if I turn on Keep Visible, and specify the container with an invisible widget (Or anything for that matters), it constraints my movement per click to:
x +- 134, Y +- 103

However, I can still click again, and move it multiple times, and go outside of bounds, with no restrictions.



I wanted to keep the sprite in the screen bounds, and I thought it would be possible to do in NGUI without having to write any scripts.


Problem 2:
Also, once you guys are here (I do not know if I should do a second thread for this other problem, but it is kind of related)

I was looking at the video tutorials because, I thought maybe I was doing something wrong, and I did not want to be hasty asking a question before researching... And while doing the scroll view, dragging my Sprite worked perfectly. But when I turned on Smooth Tween in the Grid Component, my dragging stopped working correctly, as if it was pulling while I was dragging, instead of pulling when I stopped dragging...

Anyone knows how to solve this too?

EDIT:

I solved problem number two, I was missing the drag and drop root on the other Panel.



Pages: [1]