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

Pages: [1] 2 3 ... 11
1
TNet 3 Support / Join Channel without loading a scene
« on: November 04, 2016, 01:19:39 PM »
I see that in TNManager is the JoinChannel method that loads a scene, what if i have a game that doesn't load any scenes but generates levels...i don't like scene stuff in unity and for simple games i generate levels and usually have only one scene

2
TNet 3 Support / Where to install TNServer?
« on: October 29, 2016, 04:21:39 AM »
I have trouble registering on Amazon EC2 (it hangs with identifying me over phone) :( is there any other server where I can install TNETServer.exe?

3
NGUI 3 Support / Re: NGUI update?
« on: July 16, 2016, 12:54:58 AM »
Thanks anyway for this great tool....Maybe you can make a post with tips and tricks how you use it in your projects and more advanced techniques.

4
NGUI 3 Support / NGUI update?
« on: July 15, 2016, 10:47:49 AM »
is there going to be major NGUI update soon, I am not saying that this version is not good but you could suprise us just as with version 3.0 :D
great tool i am using it for around 4 years and it's great! Thank you!

5
NGUI 3 Support / Re: Change UIAtlas References from downloaded bundle
« on: February 12, 2016, 04:08:45 AM »
Can you help me by telling me what kind of bundle you built? only textures or complete Atlas prefab?

6
NGUI 3 Support / Re: Asset Bundled NGUI
« on: February 12, 2016, 03:50:31 AM »
Thanks Aren! I followed your advice and made asset bundles for three textures sd,hd and ud.
It correctly downloads and replaces texture on material but I suspect that I need one more step to notify
NGUI that change took place. For example, I have label set with reference atlas set to DefaultSD, for test I set
texture UD to be downloaded and it does but sprites get messed up when changed. Is this proper way to change textures on materials:

  1.  
  2. Caching.CleanCache();
  3.  
  4.         Debug.Log(url);
  5.         _download = WWW.LoadFromCacheOrDownload(url, 1);
  6.         yield return _download;
  7.         if (!string.IsNullOrEmpty(_download.error))
  8.         {
  9.             Debug.LogError(_download.error);
  10.         }
  11.         else
  12.         {
  13.             _bundle = _download.assetBundle;
  14.             Debug.Log("Bundle Loaded Successfully" + _bundle.name);
  15.         }
  16.  
  17.         if (_bundle != null)
  18.         {
  19.             var texture =_bundle.LoadAsset(assetName,typeof(Texture));
  20.             AtlasREF.spriteMaterial.mainTexture = texture as Texture;
  21.             AtlasREF.MarkAsChanged();
  22.         }
  23.  
  24.  

7
NGUI 3 Support / Re: Replacement atlas is disappearing after scene load
« on: February 08, 2016, 08:32:06 AM »
Have you manged to figure this out?

8
NGUI 3 Support / Re: Asset Bundled NGUI
« on: February 08, 2016, 08:23:01 AM »
Any ideas about this? I am trying to bundle sd,hd and ud atlases and downoad in the first splash scene the one that is determined by the screen width?

9
NGUI 3 Support / Re: NGUI for iOS, Texture Atlas compression
« on: January 12, 2016, 11:39:06 AM »
what is actual workflow in converting textures to bytes and converting back to textures...i am getting the same size but probably doing something wrong!

this could save me some space since there are a lot of textures in the game i am working on! thanks!

10
Thanks! This goes to _scroll.panel.MarkParentAsChanged();
Right?

11
Hi! I am trying to use pools of ui prefab elements to avoid constant instantiation and destroy of objects. Everything works fine,
i am spawning elements to table which is under scrollview, i also modified NGUITools.AddChild method (rather made another one) that
doesn't create gameobject but uses one that is passed (spawned beforehand).

here is the modified method:

  1. static public GameObject AddChild(this GameObject parent, GameObject prefab)
  2.         {
  3.             if (prefab != null && parent != null)
  4.             {
  5.                 var t = prefab.transform;
  6.                 t.parent = parent.transform;
  7.                 t.localPosition = Vector3.zero;
  8.                 t.localRotation = Quaternion.identity;
  9.                 t.localScale = Vector3.one;
  10.                 prefab.layer = parent.layer;
  11.             }
  12.             return prefab;
  13.         }

not much going on here.

here is the method i am using to spawn elements to table:
  1. ...
  2. for (var i = 0; i < weaponConfigs.Length; i++)
  3.         {
  4.             var pooledWeaponItem = Game.Pools.GetPool(PoolType.UI).Spawn(Item.transform, Vector3.zero, Quaternion.identity);
  5.            
  6.             var item = UIExtensions.AddChild(_table.gameObject, pooledWeaponItem.gameObject);
  7.  
  8.             var controller = item.GetComponent<WeaponItem>();
  9. ....
  10. }
  11.  

and everything works fine but the problem is when element that was in the pool and need to be reused is spawned to table but is not visible (this happens
depending on how much elements are in the pool...it happens earlier if there is less elements in the pool)

I figured out when i disable and enable again sprite it appears visible and then when i disable and enable gameobject of the spawned item itself it appears
in the table and starts working.

i tried
  1.         _scroll.panel.SetDirty();
  2.         _scroll.panel.RebuildAllDrawCalls();
  3.  

but it doesn't work, also i tried
different combinations of
NGUITools.SetActive for spawned element but it doesn't work...what seems to be the problem? Any ideas?

thanks!

12
NGUI 3 Support / Re: how do you use nguitools.draw?
« on: January 01, 2016, 07:50:06 PM »
ok i understand now how it's created, but how do you later access slider? you only have reference to the sprite you created?

13
NGUI 3 Support / how do you use nguitools.draw?
« on: January 01, 2016, 03:18:52 PM »
I wanted to display simple info and label shows in hierarchy but nothing is drawn, font is miising...do you need to setup ui that you want to show with nguitools.draw beforehand? And if so how it is exactly done?

14
NGUI 3 Support / Re: Error after importing NGUI3.9.6
« on: December 22, 2015, 01:36:24 AM »
same here

15
NGUI 3 Support / Filled Sprite -> Circle with thumb
« on: October 18, 2015, 06:31:15 AM »
Hi! Any ideas how to add thumb, or other sprite to the position where filled sprite is currently?

Pages: [1] 2 3 ... 11