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

Pages: [1] 2
NGUI 3 Support / NGUI vs TextMesh Pro
« on: March 08, 2017, 10:46:43 AM »
Hi there,

on the Unity blog here they are summarizing the Unity keynote at GDC 2017. There they are saying that in the future TextMesh Pro will be integrated natively into Unity.

I find this interesting because one feature of NGUI that I was never able to use was to create your own bitmap fonts via the FreeType.dll, since that never ran on Mac OS X. In this video the creators of TextMesh Pro are saying that TextMesh Pro can create bitmap fonts. I assume that the bitmap atlas TextMesh Pro creates can not be used directly by NGUI. But maybe that would be a feature worthy to add to NGUI in the future?

The reason this is attractive to me specifically is that I recently switched from a 1080p monitor to a 1440p screen. I am using the Aldrich bitmap font that came with NGUI (or was it Starlink UI?). On my new monitor I am noticing that the Aldrich bitmap font looks a bit blurry. So now I want to regenerate the bitmap font at a higher resolution, but FreeType does not work on OS X.

So I guess my question is: What could the relationship between NGUI and a native TextMesh Pro be in the future? Or, could you update Starlink UI to include a higher resolution Aldrich bitmap font?

TNet 3 Support / Making TNManager more customizable
« on: April 30, 2016, 05:14:05 AM »

using TNet 3 I've now run into a bit of a problem. I will propbably start using other assets at one point, stuff like uFrame or the Entitas framework. The problem is that some methods in TNManager, especially JoinChannel are not really compatible with them. Methods like JoinChannel provide a lot of functionality, in this case loading a level. Other methods create a prefab. uFrame or Entities however handle these tasks differently. Sure I could just edit the TNManager class, but that would be a problem with future updates.

So, could you in future updates make TNManager more customizable? For example, by marking methods like JoinChannel as an override? Or make TNManager a partial class?

TNet 3 Support / DataNode serialization limitations
« on: April 26, 2016, 05:58:18 PM »
Sometimes here on the forum I read that TNet can serialize everything, but it seems I have run into a few limitations. I did only use text-mode though. Am I doing something wrong or is that TNet? Pseudo-code follows ...


When you add a child a la

  1. dn.AddChild ( "MyString", string.Empty )

the file creation on the server silently fails. Do

  1. dn.AddChild ( "MyString", "" )

and it works. Interestingly the log claims that the file was created, but it's just not there. I am not 100% sure of this though. Have to do more tests.


Dictionaries. This

  1. using System.Collections.Generic;
  3. public static struct MySaveStruct () {
  5. Dictionary<int,string> myCargo = new Dictionary<int,string>() {
  6. "Food" = 10 };

ends up as:

  1. Cargo = System.Collections.Generic.Dictionary`2[System.String,System.Int32]

Same thing for a Dictionary<int,int> which becomes

  1. Standings = System.Collections.Generic.Dictionary`2[System.Int32,System.Int32]

My guess is that you are not supposed to use Dicts? Instead add a lot of child nodes? Like, AddChild ( "Food", 10) ), AddChild ( "Industrial", 20 )? And then iterate through

  1. dn.GetChild<DataNode>("Cargo").children



TNet has problems with namespaces? The MySaveStructs works if the props are just ints and strings etc. But

  1. namespace MyNameSpace {
  3. public static struct MySaveStruct () {
  5. List<WeapStruct> weapons = new List<WeapStruct>();
  6. }
  8. public static struct WeapStruct () {
  10. string name = "MyWeapon";
  11. }
  12. }

will result in a hard failure and an entry in Debug/TNetErrors.txt:

  1. [2016/04/27 00:04:05] ERROR: Unable to resolve type 'MyNameSpace.WeapSave'
  2. (... Error Stack ...)

Again, same resolution as above?

Or just throw my complex struct of structs into the BinaryFormatter and send that to the server?

( bonus round )

System.Collections.Generic.List vs TNet.List caught be off guard. And you can't do

  1. BetterList.AddRange ( anotherList );


  1. BetterList<string> myBetterList = new BetterList<string> { "First", "Second" };

and the error talks about IEnumerator?
Is there something I am not seeing here? Design decision you regret now?

TNet 3 Support / HTTP GET requests
« on: April 09, 2016, 05:31:30 AM »
In the feature description for TNet 3.0 it says:

- NEW: TNet is now able to respond to a simple HTTP browser GET request. Simply connect to your server via

I am not sure I understand. This can't work without some webserver like Apache, right? If so, I find that feature point a bit misleading. And I don't mean that as an accusation, I just find it a bit unclear. What exactly do I have to do to use this feature?

TNet 3 Support / Mass-exporting prefabs as DataNodes
« on: March 24, 2016, 05:28:22 PM »
Hi there,

I just recently updated to TNet 3, I am now going through the examples and so far I like what I am seeing.

To enable modding I am using asset bundles. That works fine as relatively simple since I don't plan to have server-side mods that people would have to download. Instead there's a mod filter for the server browser.
Going from Unity 5.3.x to 5.4b I noticed that the creation of asset bundles now takes a build target. I find that tedious since I am targeting Win/Mac/Linux. So let's say that's my motive to go the DataNode route.

My asset bundles can be devided into three categories: text files, prefabs and textures (png files). Each of these contains multiple asset bundles with A LOT of objects. I assume I can export prefabs to DataNodes one by one manually. Is there a less tedious way? And what about text files and pictures?

Is there a way to translate my asset bundle process to DataNode creation?

NGUI 3 Support / Problem with NGUI adding AudioListener
« on: September 17, 2015, 01:04:40 PM »

here's my situation. In my game, I am loading content from a different level additively. That's the "Content" level. The Content level includes a MasterAudio prefab + an Audio Listener + some helper cameras, but no NGUI elements (it will soon).

This Content level is being loaded from the "Campaign" level which includes a specific NGUI setup. The Campaign level included a NGUI Tooltip GameObject with the standard NGUI Tooltip script. That GameObject also includes a NGUI Play Sound script that plays a sound OnDisable.

The problem is that the tooltip triggers this sound before the Content level is fully loaded. Since the Campaign scene includes no AudioListeners, NGUI creates one. Since the MainCamera is in the Content scene, NGUI puts it on one of the friggin helper cameras. Now my scene included two AudioListeners and Unity comes to a halt.

If I deactivate the NGUI Tooltip object in the scene view of the Campaign level, this does not happen and everything works. But then the Tooltip doesn't draw anymore, since NGUI (for whatever reason) requires the GameObject to be (x) active in the beginning.

Anybody got any ideas?

Would it help not to use NGUIs PlaySound script, but to channel everything through MasterAudio?

NGUI 3 Support / Tooltip doesn't work with 3D UIs?
« on: September 03, 2015, 06:25:34 PM »

do Tooltips not work with 3D cameras?

The reason I ask is that I use UITooltip in a lot of places in my game and they work as intended - in a scene that only has 2D UIs.
I not added a tooltip in a scene with only a 3D UI and there the tooltip does show ... But at pos.z = -700, which is shortly before the 3D camera. If I could set the near clip plane to 0 it would maybe show up. But at 0.01 it doesn't.
As a result, I can see the tooltip in the Scene, but not in the Game preview.

Any thoughts? Thx


I am starting to use TNet in my project and now I naturally have a lot of questions.

1) I have a Raspberry Pi here running the TNServer.exe in Linux Mono. However, reading the docs, my understanding is that this machine could only host the Lobby, not a Game Server?

What I want is that a Client can connect to a Lobby and then start a dedicated server on a remote machine, connect to it and then other clients can join in.

Does TNet just not have this functionality?

2) I can compile some "Hello World" example .cs file using mcs on the Pi. I can not compile the ServerMain.cs. It compains that the TNet and related files/classes can not be found.

Do I have to re-arrange some folders so that the compiler finds the folders and files? Or do I have to go deeper (which propably is above my beginner level Linux skills)?

NGUI 3 Support / Weird Application isPlaying error
« on: May 08, 2015, 04:40:51 PM »
Uhm, I am getting a weird error when opening a project that contains NGUI. It's the SGSK/NGUI/TNet special edition package. Thing is, I never got this error. I am not getting it in other projects. Unity, TNet and NGUI are all up to date (5.0.1, 2.0.5 and 3.8.2).

  1. Assets/NGUI/Scripts/Interaction/UIButtonColor.cs(75,42): error CS0117: `Application' does not contain a definition for `isPlaying'
  2. Assets/NGUI/Scripts/Interaction/UIButtonColor.cs(83,42): error CS0117: `Application' does not contain a definition for `isPlaying'
  3. Assets/NGUI/Scripts/Interaction/UIButtonColor.cs(128,61): error CS0117: `Application' does not contain a definition for `isPlaying'
  4. Assets/NGUI/Scripts/Interaction/UIButtonColor.cs(159,34): error CS0117: `Application' does not contain a definition for `isPlaying'
  5. Assets/NGUI/Scripts/Interaction/UIButtonColor.cs(181,34): error CS0117: `Application' does not contain a definition for `isPlaying'

Again: I am not getting this in any other project with a similiar setup. I never got this in the same project before and I have not updated the project recently.

It does not go away when I restart Unity. The Inspector is unusable since the scripts are not being loaded ("fix compilation errors"). Can't hit Play either, obviously.

Other Packages / SGSK or StarlinkUI ready for Unity 5?
« on: April 23, 2015, 06:01:36 PM »

I purchased the SGSK + the Starlink UI package in the past (NGUI/TNet version). No I wonder: Is this thing compatible with Unity 5 or will Unity3D explode with error messages when I import this thing?

NGUI 3 Support / UI layer vs NGUI layer
« on: March 18, 2015, 02:05:27 PM »

for a side project I just created a new 2D GUI with NGUI 3.8.0 (Unity v5.0).

Now, I used the toolbar to create a new 2D GUI. It is automatically played on the "UI" layer. The drag&drop ready-made example Prefabs from the Wooden Atlas however are on the "NGUI" layer (layer 8).

Whenever I drop a premade Prefab into the scene, NGUI complains about the layer difference and puts them on the UI layer - as expected.

But ... Is this the desired behavior? Every time you use the prefabs you get a complaint?


Oh ... Some strange behavior (bugs?).

Can't locate FreeType64.dylib. FreeType.dylib is there, but it isn't accepted by the FontMaker.

Dragging the "Control - Simple Button" into the scene, creates a "NGUI Snapshot Point 36" empty GameObject under the label in the Hierarchy. What's that?

NGUI 3 Support / Yes, my widget is a child of the panel
« on: September 04, 2014, 04:52:13 PM »

my hierarchy is built like this:

"Panel" (UIPanel with clipping + UIScrollView)
+ "Sprite" (UIDragScollView + Box Collider + UIWidget)
++ "Stuff 1"
++ "Stuff 2"
++ ...

Thing is, NGUI complains with:

Widgets and panels should not be on the same object! Widget must be a child of the panel.
UnityEngine.Debug:LogError(Object, Object)
UIWidget:OnStart() (at Assets/NGUI/Scripts/Internal/UIWidget.cs:1042)
UIRect:Start() (at Assets/NGUI/Scripts/Internal/UIRect.cs:430)

But isn't it? Or does UIDragScrollView count as a Panel?!


Got it. I have it that when I click the "Stuff" buttons, I use a manual call to SpringPanel.Begin() to position the "Sprite". In that moment, a UIPanel gets added and NGUI complains.

When I use a manual  transform.position = newPos, there's no problem.

NGUI misbehavior or should I set my stuff up differently?


yeah, thread title says it all. I updated my project from 3.5.3 to 3.5.6 and now all NGUI elements are not drawn anymore (see screenshot). I have changed nothing else.

Checking things like camera draw masks or the material of the atlas (Unlit - Transparent Colored (AlphaClip)) shows nothing unusual.

Importing NGUI into an empty project and going through the example scenes, NGUI is drawn correctly as usual.

Any clue on what is going on here?

Unity 4.3.4f1. Mac OS X.9.1. CustoMac w/ GTX 650 Ti.

Nevermind. I tested the main menu scene and the GUI was there. Then going back to the main game scene the GUI was back there, too.

NGUI 3 Support / Cant select fonts inside an Atlas
« on: March 11, 2014, 06:32:20 AM »

I started integrating NGUI in my game and I noticed that I get two draw calls instead of one. I bought the Starlink UI Kit, so I got three UIFont objects: Arimo, Medium and Large. Those three are also integrated into the "Space" Atlas. OK cool, as expected.

But when I chose a font for my UILabels, I cant select the "Space" Atlas and then one of the three integrated fonts. Instead, I am offered the three extra Arimo, Medium and Large font objects. Ergo, I now got two draw calls, one for the Space atlas and one for the font.

Why cant I select a font that is integrated into the atlas?

Also notice the attached screenshot. On clinking "Show All", where NGUI looks for fonts, it seems the old list isn't cleared, thus listing all font objects multiple times.

NGUI 3 Support / Alignment Left + Resize Freely - Doesn't work?
« on: March 11, 2014, 06:19:47 AM »

as you can see in the screenshot, I have a little AI Debug display in my game. With older NGUI versions (v3.4.7?) it worked, but with newish Label -> Alignment: Left option it doesnt anymore.

It seems that when you chose Alignment: Left and Overflow: ResizeFreely the Label grows in all directions, instead of only to the bottom and right.

Or am I doing something wrong? I thought one was supposed to use Anchors now, but ResizeFreely disables the Anchors option on the Label. Hm, OK, makes sense ... but what now?

Pages: [1] 2