Hello Guest

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

Pages: [1]
1
Support / Re: Resize tk2dUIScrollableArea on real time
« on: September 06, 2013, 01:54:38 pm »
After post i realize that i could take out the tk2dUIItemBoundsHelper class from editor. But the tk2dScrollableArea.MeasurecontentLength function was a better solution.

Thank both of you.

2
Support / Resize tk2dUIScrollableArea on real time
« on: September 05, 2013, 10:47:49 pm »
Hi, i'm making a folders system (a button that has content down) and using iTween expand and contract the content. All of this things are inside a tk2dUIScrollableArea, but i need to fix on realtime the size of the content (ContentLength).

To make the extension I use tk2dUIItemBoundsHelper on editor classes to get the size, but when i want to do it on real time Unity debug me this:

Quote
Assets/Scripts/Manager/MenuManager.cs(24,33): error CS0103: The name `tk2dUIItemBoundsHelper' does not exist in the current context

3
Support / Re: tk2dTextMesh at runtime
« on: September 03, 2013, 11:13:10 am »
Yes, i don't set it ny code, but in editor appear. I'm gonna try this

4
Support / tk2dTextMesh at runtime
« on: September 03, 2013, 02:16:08 am »
I'm trying to create a tk2dTextMesh at runtime.

I have my class Title

Code: [Select]
public Texture icon;
public string text;
public bool showingContent;

public List<Title> parent = new List<Title>();
public List<Title> menuList = new List<Title>();
public List<Content> contentList = new List<Content>();

And my function:

Code: [Select]
void CreateTitle(Title title){

GameObject parent = new GameObject();
GameObject icon = new GameObject();
GameObject back = new GameObject();
GameObject text = new GameObject();

menuManager.gameObjecsInScene.Add(parent);

icon.transform.parent = parent.transform;
text.transform.parent = parent.transform;
back.transform.parent = parent.transform;
parent.transform.parent = menuManager.tk2DScrollableAreaContent.transform;

icon.name = "Icon";
text.name = "Title";
back.name = "Back";
parent.name = title.text + " title";

parent.transform.localPosition = Vector3.zero;
back.transform.localPosition = Vector3.zero;
icon.transform.localPosition = new Vector3(-16, 0, 0);
text.transform.localPosition = new Vector3(-12, 0, 0);

tk2dTextMesh textMesh = text.AddComponent<tk2dTextMesh>();
textMesh.anchor = TextAnchor.MiddleLeft;
textMesh.text = title.text;
textMesh.maxChars = 50;
textMesh.scale = Vector3.one * 15;
textMesh.Commit();

}

But i always get:

Quote
NullReferenceException: Object reference not set to an instance of an object
tk2dTextMesh.Commit () (at Assets/TK2DROOT/tk2d/Code/Fonts/tk2dTextMesh.cs:540)
MenuManagerEditor.CreateTitle (.Title title) (at Assets/Editor/MenuManagerEditor.cs:143)
MenuManagerEditor.CommitMenu () (at Assets/Editor/MenuManagerEditor.cs:110)
MenuManagerEditor.OnInspectorGUI () (at Assets/Editor/MenuManagerEditor.cs:34)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/Mono/Inspector/InspectorWindow.cs:888)
UnityEditor.DockArea:OnGUI()

In inspector, all the values i set are perfectly in place, but the text doesn't apear. If a change in editor the text, then it create the mesh and the text apear.

5
Support / Re: Unity always ask me to save scene
« on: August 21, 2013, 05:13:13 pm »
Ok, thank you, i'll be waiting for the next version.

6
Support / Unity always ask me to save scene
« on: August 21, 2013, 04:37:46 pm »
Since tk2D 2.1, i can't remember if it happens with 2.0, any time I want to quit Unity or switch to another scene Unity always ask me to save the actual scene, even if I've already save it, but when i open a scene that doesn't have any tk2Dsprite Unity works normally.

I'm using tk2D 2.1 and prime[31] social networking in this project, but I am pretty sure thats it's not prime[31]

7
Support / Re: Reloading scene destroys UI camera of tk2dUIManager
« on: August 21, 2013, 04:31:54 pm »
You can try creating a script and added to the camera with:

Code: [Select]
DontDestroyOnLoad (gameObject);
Maybe UIManager already has it, and lose the reference of the camera.

8
Support / Re: Create Sprite collection on runtime
« on: August 20, 2013, 07:18:30 pm »
wow, thanks a lot.

It was pretty easy.

You make a fantastic work with tk2D.

9
Support / Create Sprite collection on runtime
« on: August 20, 2013, 06:48:26 pm »
Hi, i'm in a little project and i want to create a news menu, where i can load using www images and texts. My idea is to have a small image, like 100px x 100px and description or something like that, and make it a button to open browser for more information.

But the problem i face is creating the Sprite collection to show the image on runtime. It this possible with tk2D?

Pages: [1]