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

Pages: [1]
1
NGUI 3 Support / change color.a it applies to children
« on: August 22, 2014, 04:49:17 AM »
I have same hierarchy:
sprite1 (parent)
-sprite2 (children)
Both sprites from one atlas. I change color.a from sprite1 and it applies to sprite2. But i don't want this.
How i can switch off this?

2
NGUI 3 Support / Re: autoupdate atlas from folder
« on: September 30, 2013, 05:14:19 AM »
if anybody want - you can use code like this: (use from editor script)

public static string PathAtlas = "Assets/w_Test/testautoatlas.prefab";
public static string PathSource = "/w_Test/autosprites";
[MenuItem("project/Update Test Atlas")]
private static void UpdateAtlas()
{
    UIAtlas teastatlas = null;
    GameObject go = AssetDatabase.LoadAssetAtPath(PathAtlas, typeof(GameObject)) as GameObject;
    if (go != null)
    {
        teastatlas = go.GetComponent<UIAtlas>();
    }

    string[] spritesStr = Directory.GetFiles(Application.dataPath + PathSource, "*.png");
    foreach (var str in spritesStr)
    {
        string assetPath = "Assets" + str.Replace(Application.dataPath, "").Replace('\\', '/');
        Texture tex = (Texture2D)AssetDatabase.LoadAssetAtPath(assetPath, typeof(Texture2D));
        if (tex != null)
        {
            UIAtlasMaker.AddOrUpdate(teastatlas, (Texture2D) tex);
        }
    }
}

3
NGUI 3 Support / autoupdate atlas from folder
« on: September 28, 2013, 05:28:52 AM »
Hello. Can anybody help me to create script that will update a atlas from special folder. (before build or may be by menu options)
need: autoupdate sprites, autoadd new sprites.

Pages: [1]