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 - jingato

Pages: [1] 2
1
Dev Blog / Re: Nov 23, 2017 -- Integrating TNet with Steam Networking
« on: March 20, 2021, 11:22:56 PM »
Hey Aren, I am looking to use TNet in my next project, which will be in VR and on the oculus Quest 2. Oculus provides a some platform features such as rooms, matchmaking, and p2p connection. I'm wondering if this same interface would be easy to use to run all the data through the oculus protocol? If so, do you know how that would be implemented best? I am going through your Steam example and there a few things I don't quite understand. The Oculus API uses a standard connection / disconnection so it's a bit different than the steam implementation, though I think the data still all goes through a single common function (not entirely sure yet). It also seems like your class that implements the Connection interface represents a connection to a specific user, yet it seems like you assign it to a single static instance, so I am unsure exactly what it is supposed to represent. Is the userId of that supposed to be the local user or the user you are connecting to for example.

Also, does this interface also allow you  to route UDP calls or only TCP?

Here's the page to the Oculus p2p. If you could just let me know if this is doable with your system that would be great. If you could help me understand how it all works and how this would be implemented with the Connection interface, that would be even more amazing.

Thanks!

2
Misc Archive / Re: Integrating TNet with Steam Networking
« on: March 20, 2021, 11:18:21 PM »
Hey Aren, I am looking to use TNet in my next project, which will be in VR and on the oculus Quest 2. Oculus provides a some platform features such as rooms, matchmaking, and p2p connection. I'm wondering if this same interface would be easy to use to run all the data through the oculus protocol? If so, do you know how that would be implemented best? I am going through your Steam example and there a few things I don't quite understand. The Oculus API uses a standard connection / disconnection so it's a bit different than the steam implementation, though I think the data still all goes through a single common function (not entirely sure yet). It also seems like your class that implements the Connection interface represents a connection to a specific user, yet it seems like you assign it to a single static instance, so I am unsure exactly what it is supposed to represent. Is the userId of that supposed to be the local user or the user you are connecting to for example.

Here's the page to the Oculus p2p. If you could just let me know if this is doable with your system that would be great. If you could help me understand how it all works and how this would be implemented with the Connection interface, that would be even more amazing.

Thanks!

3
I believe this is actually a Unity bug, not NGUI.

4
NGUI 3 Support / Re: NGUI Camera with SimplePixelizer
« on: May 22, 2014, 03:15:12 PM »
Image effects perform horribly on mobile devices. There's nothing you can really do about that.

5
NGUI 3 Support / UIScrollView UpdatePosition
« on: May 20, 2014, 02:59:08 PM »
Hi, I just updated to the latest NGUI and noticed my scrollviews were no longer acting as normal. Looking at the code it looks like you aded additional conditions on the UpdatePosition function that requires it to have a scrollbar.

  1. public void UpdatePosition ()
  2.         {
  3.                 if (!mIgnoreCallbacks && (horizontalScrollBar != null || verticalScrollBar != null))
  4.                 {
  5.                 }
  6.         }
  7.  

I was wondering why you added this condition and if there is something else we should now be using to update the position or if I should remove this condition.

Thanks

6
NGUI 3 Support / Re: Skew Sprites
« on: May 14, 2014, 10:13:29 AM »
Cool, Ill give it a try!

7
NGUI 3 Support / Skew Sprites
« on: May 13, 2014, 04:17:29 PM »
Hi, I was wondering if you had any plans to add support to skew sprites and textures in future versions. This is one feature I'd really like to see. It would be create for creating a faux 3D UI without using a perspective camera and all the goodness that comes with an ortho camera. It could also just be used to easily reshape sprites.

Thanks

8
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: May 09, 2014, 04:08:15 PM »
It would be great if we could skew sprites so we could make a UI that looks as if it's in a perspective camera without the headache of actually using a perspective 3D UI.

9
NGUI 3 Support / Question about UIPanel
« on: May 09, 2014, 04:03:12 PM »
Hi, I was having an issue with UIPanel where Im creating a scrollview and Im anchoring the panel so it grows and shrinks with its parent. I have a function that collapses it so it basically hides all the items. This essentially tries to set the size of the UIPanel's width to 0. It was giving be odd result though as the panel would never go below 20 units. I dug around inside UIpanel and found this code:

  1. float minx = Mathf.Max(20f, mClipSoftness.x);
  2. float miny = Mathf.Max(20f, mClipSoftness.y);
  3.  
  4. if (w < minx) w = minx;
  5. if (h < miny) h = miny;
  6.  
  7. // Update the clipping range
  8. baseClipRegion = new Vector4(newX, newY, w, h);
  9.  


I was wondering why this is there and if it is safe to remove this min size so that I could do what I want it to. I tried removing it and it works, but I want to make sure that  it won't break something else as Im sure it was put there for a reason.

Thanks

10
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: February 26, 2014, 11:40:35 AM »
I would like to be able to add gradients to sprites. It would also be cool to have either liner or radial gradients.

I'd also really like to be able to hold shift and have widgets scale uniformly when using the handles. Also be able to hold shift when dragging a sprite to constrain the movement to a sigle axis.....similarly to photoshop

11
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: January 31, 2014, 01:30:31 PM »
Yes, but what would set those parameters, exactly? Events are generic. They don't know anything about your buttons or where they come from.

You could simply name your buttons properly. Or attach a data script:
  1. using UnityEngine;
  2.  
  3. public class MyButtonData : MonoBehaviour
  4. {
  5.     public int buttonIndex = 0;
  6.     public string someCustomValue = "abc";
  7. }

...then all you need to access it in your OnClick callback is:
  1. MyButtonData data = UIButton.current.GetComponent<MyButtonData>();
  2. Debug.Log("Clicked on button " + data.buttonIndex + " with value of " + data.someCustomValue);


That's just the thing I'd rather avoid though. I would rather just have a method like OnItemSelected(int itemNumber) and in the inspector select the method from the drop down ans enter the number. I attached an example of this around page 2 of this thread I think. Or maybe just have an Object field on the UIButton that we can set some arbitrary data to.

Another thing I really would like to see is some improvements to the new anchor system. I found the new system a bit confusing but I'm starting to understand it now. I think it really lacking the ability to set you're anchors as percentages instead of pixels. Unless I'm just missing something. For example, I wand to have a group of labels placed horizontally in a row and have them evenly spaced based on the screen width. I can't seem to find a way to do it.

**EDIT** I figured out how to layout the buttons evenly by using custom as the anchor choice. It's not very cleat that that's what it does though and hard to figure out how to use properly. Plus if you decide to add another item later you will need to go over all the other items and update there anchor values to fit the new one in., which which makes it a pain...I could write code to adjust all the anchors at runtime, but If I'm doing that then I mine as well just position them myself.

12
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: January 30, 2014, 01:53:32 PM »
@Asmolicious: UIButton.current tells you what called the On Click function. No need to have many functions. Same with toggle (UIToggle.current), input (UIInput.current), camera (UICamera.current), etc. All NGUI classes are set up the same way. The 'current' value is set right before a callback.

That is helpful, but most of the time having a reference to the button doesn't give much. If you are creating a scroll  list of buttons for example you would want to know which index you pressed which means you either need another script on the button which tracks the buttons index or you have to use the name of the gameobject to keep track of it, which I don't like. It would be nice if the buttons on click event could pass in parameters like and int, string, or enum. That would also be helpful when creating static UI so you can have one function for a set of buttons and pass in a parameter set in the inspector.

this is a pretty important feature that is needed IMO.

13
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: December 04, 2013, 01:11:11 PM »
1. HD & SD Atlas building:  It would be nice to give the atlas make the option to build 2 atlases, and HD and an SD version. Right now I have to build the HD version and then duplicate the generated version and manually re-size it. I have to do this every time I rebuild the atlas so it would be nice it NGUI atlas maker could do that atomatically.

2. I really big thing I would like is a filled sliced sprite. That is, a sliced sprite that also has the same ability as a filled sprite.

3. Some type of markup system to allow you to change the font or make it bold, italic, change size, etc, all in the same label

4. Data binding

5. As I mentioned in an earlier post. Ability to use parameters in button events.

Thanks! and can't wait for uGUI!

14
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: November 18, 2013, 11:49:45 AM »
The biggest thing I would like is the ability to have parameters in the events for buttons. I wrote my own behavior to it, but it would be nice to have it built in to the UIButton with the new event system.

I've attached my version if anybody wants to try it out.

15
NGUI 3 Support / Re: sliced and filled sprite
« on: May 23, 2013, 04:28:15 PM »
Thank you for the reply,

unfortunately the progress bar is not what I'm looking for, that is basically like a regular sliced sprite. The sliced sprite has a black border so I want to mask off one half without showing the border, but keep it on the other half.

I'll look up the clipping tutorial you mentioned. I don't want to use an additional panel because I dont want to have another draw call. I was looking into extending slicedSprite and adding the same functionality as the filled sprite, but I couldn't get it to work.

Thanks

Pages: [1] 2