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

Pages: [1] 2
1
NGUI 3 Support / Animation with zerk in ngui 3.5.8
« on: April 15, 2015, 03:07:55 AM »
Hi

I am using ngui 3.5.8 for my project which is a 2d card battle game. It require so many animation like scaling , translating etc.For this i used TweenTransform , TweenPosition , SpringPoisition , etc (all the UITweener class).

It's running fine on my pc (contains 8gb ram , 8500gt graphic card). it's running like HARMONY (as expected).

When i transferred the build on any android higher end phone like Samsung S4 , Note 3 etc or Any iOS device like iPHONE 6 , 6+ etc or what ever the device, all the animation starts with a great ZERK.

I am not able to find the reason for that. As i almost followed the ngui standard practices for the ui. But it still not giving me the feel of ANIMATION (flawless , HARMONIOUS) .

Kindly suggest me from where i have to start debug. Throughout the project only 2 atlases is used of size 2048*2048.

every thing is on the scene . using pooling.

thanks in advance


2
NGUI 3 Support / Re: Camera jerk when switching 2d Camera to 3d Camera.
« on: September 21, 2014, 02:49:25 AM »
2d cards are on 2d layer (8), which render from start (Orthographic camera)-
different copy of  same 2d cards are on perspective layer(9) - after some time this layer activated and during this activation some jerk is coming (Perspective camera)
models 3d are on Modelperspective layer(10) - this is activated at the last (perspective camera)

Layer 8 cards & layer 9 cards are exactly same only layers are different. During transition/switching Layer 9 cards displays on the top of layer 8 cards after that i hides the layer 8 cards. then JERK cames.






3
NGUI 3 Support / Camera jerk when switching 2d Camera to 3d Camera.
« on: September 20, 2014, 04:19:41 AM »
Hi

I am creating a some game animation . In that animation i have used UIRoot 2d to render the 2d elements like cards(UiSprite)  etc …. and 3d UIRoot (with perspective camera) for elements like 3d Models . During the animation frame at particular time , I have rendered the same copy of cards in 3d perspective camera  and then 3d models renders with some animation.

Means initially UiRoot 2d is working from the start , then after some time i switch on the UIRoot 3d camera (perspective) which is already there in the Scene . i never disabled the UIroot 2d . Only enable & disable the UIRoot 3d. i also taken care about the layer & depth.

Also i followed the NGUI 3.x tutorial to render the 3d character & 2d elements (example 10).

But during the transition some JERK is coming.I think it is due to camera Or it may be due to scale of Cards(UISprite).

Please help me out to solve this.

Also if possible suggest some kind of BLOOM effect (light weight) (for mobile platform) which i can play during the transition .

Thanks in advance.


 


4
NGUI 3 Support / NGUI Atlases not destroying.
« on: June 17, 2014, 06:13:12 AM »
Hi

I have created two prefab say page1 & page2 . page1 uses atlas1 & page2 uses atlas2 .

Pag1 prefab is the child of UIRoot ( present in the scene from the start ) , And "mainmenu.cs" is attached to it.
following code has bee wrtten to load the page2.

method 1
GameObject ob = (GameObject)Instantiate((GameObject)Resources.Load("page2"));
ob.transform.parent = root.transform;
ob.transform.localScale = new Vector3(1f, 1f, 1f);

method 2
NGUITools.AddChild(root.gameObject, page2);

and to destroy the page1 prefab

DestroyImmediate(this.gameObject, true);
yield return Resources.UnloadUnusedAssets();

(simple example to load & unload the page & atlases)

But in the profiler it still displaying that both atlases in the memory. Even after using the DestroyImmediate for page1 object
it's atlas is still in the memory.

Iam using NGUI 3.5.5.

Can any body help?




5
the png file itself is a single sprite. which is uploaded on to server. i will download this image & create a atlas at runtime.
which will finally apply to any uisprite.



6
NGUI 3 Support / Re: Drag Object does not work
« on: June 06, 2014, 01:48:31 AM »
make sure about the box collider width & height.
add UIDragDropItemScript on to it.



7
Hi

i want to create a ngui atlases at the runtime for the png image file. In our game some of the image file will be stored at the server end. At run time i have to download them , & display them. i am ngui sprite.
Can any body help?

8
i am also facing the same issue . Can any one help ?  :'(

9
NGUI 3 Support / Re: Drag Drop Issue
« on: May 13, 2014, 10:19:09 AM »
Currently grid sorting parameter is NONE and sorted = false , currently i want it to place the dragged object, on the object where i am dropping it (UICamera.hoveredObject);

10
NGUI 3 Support / Re: Drag Drop Issue
« on: May 13, 2014, 02:59:17 AM »
And more issue i forgot to mention.

1. Moment i select an object and start dragging slowly then all other nodes of that grid or container reposition itself automatically.
   I don't want it.

2. When i drag (xyz) some object from left container , and drop it on (pqr) object on right container, then xyz adjusted in right container , & pqr object adjusted in left container BUT PQR object comes from the right side of the left container ( with clipping ) which is looking not connected visually . It should come normally from right to left without clipping . It should come normally as i dragged the object out side the left panel (visible) .

i am using the following code to swap back.

// Container found -- parent this object to the container
            target.transform.parent = (Container.reparentTarget != null) ?
               Container.reparentTarget : Container.transform;
            
            // Update the grid and table references
            NGUITools.FindInParents<UIGrid>(target.transform.parent);
            NGUITools.FindInParents<UITable>(target.transform.parent);
            
            UIDragScrollView dSV = NGUITools.FindInParents<UIDragScrollView>(target);
            if (dSV != null)
            {
               dSV.scrollView = NGUITools.FindInParents<UIScrollView>(target.transform);
            }
            
            // Notify the widgets that the parent has changed
            NGUITools.MarkParentAsChanged(target);
            
            Vector3 pos = target.transform.localPosition;
            pos.z = 0f;
            target.transform.localPosition = pos;

        m_playing11Grid.sorted = false;
        m_playing11Grid.Reposition();
        m_playing11ScrollView.UpdateScrollbars(true);

        m_substituteGrid.sorted = false;
        m_substituteGrid.Reposition();
        m_substituteScrollView.UpdateScrollbars(true);

11
NGUI 3 Support / Re: Drag Drop Issue
« on: May 13, 2014, 01:47:19 AM »
Hi

I some how managed to implement the following

2. When i select a (xyz)object from leftcontainer , and drag it to some object (pqr) of rightcontainer , (pqr) object should give some give auto scale feature(visual feedback) to show that i am the destination object on which you can drop the object(xyz).


But i am still facing issue in implementing the following


1. when i select the 2nd position (XYZ) player node from the LeftContainer and drag it , and drop it on to 3rd position (PQR) node Right substitute player list , then it should swap , 3rd (PQR) player should appear at the 2nd postion of the LeftContainer & 2nd player should be adjusted at 3rd position of the Right Substitute player list container.

Presently it is adding it to the last of the list.
I want swaping should be done only between two position of the two containers.





12
NGUI 3 Support / Drag Drop Issue
« on: May 12, 2014, 04:05:57 AM »
Hi
i am implementing the drag drop functionality for my cricket game where user can able to swap a player from playing 11 team to substitute player and vice-a-verse. I have implemented it as follow.

for playing 11
LeftContainer (uiwiget , drag drop container , drag scroll view,box collider) attached
  - Left Scroll View ( uipanel , uiscrollview )
     - Grid (uigrid )

On runtime i have added the player prefab (Drag Drop script , uidrag scroll viiew script attached) .

Similarly RightContainer for the substitute player .

Drag and drop is working in my project. But i am trying 2 following functionality.

1. when i select the 2nd position (XYZ) player from the LeftContainer and drag it , and drop it on to 3rd position (PQR) Right substitute player list , then it should swap , 3rd (PQR) player should appear at the 2nd postion of the LeftContainer & 2nd player should be adjusted at 3rd position of the Right Substitute player list container.

Presently it is adding it to the last of the list.

2. When i select a (xyz)object from leftcontainer , and drag it to some object (pqr) of rightcontainer , (pqr) object should give some give auto scale feature(visual feedback) to show that i am the destination object on which you can drop the object(xyz).

Can anybody help me out ?
thanks










13
NGUI 3 Support / Sub image of the big image
« on: May 02, 2014, 08:30:16 AM »
Hi

I am thinking to reduce the atlas creation & handling part. What i am thinking i will have a big 1024*1024 image png file with alpha transperancy, containing the small image placed one after another with one pixel padding. We will have the x,y,width,height of perticular image. At runtime, i will specify the sprite name , and UV position (x,y,wd,ht).

How can i do this?

14
ok got the point , now i changed my menumenu prefab structure like below

MainMenu (Empty game object) Having NGUI PANEL attached also some page script attached.
   BgContainer (empty game object)
       backgound sprite - unified anchored to MainMenu transform panel with all left , right , bottom , top = 0
       Button 1 - center anchored to MainMenu panel etc.

Now i want my entire mainmenu prefab container  should came on screen with left to right tween position animation.
what all i exactly need to do ?
Tweenposition.Begin() not working if the panel contains any kind of anchoring inside it. I also tried to disable & enable my anchor script before & after the tween position animation but .... ended up with dirty jerk of the background image .

There should be some way , through which i can apply tween position animation to PANEL without affecting its child elements anchoring & stretching.

Since every child thing inside the prefab are anchored & strectched based on parent MainMenu Panel  , and if i tweening my mainmenu base panel , then i think everything inside the panel should move with it .

thanks
 


15
Hi
i have created 2 custom script.
1st for the background image to stretch n anchor as per device resolution.
sprite.SetAnchor(uiRoot.transform);
sprite.leftAnchor.absolute = 0;
sprite.rightAnchor.absolute = 0;
sprite.topAnchor.absolute = 0;
sprite.bottomAnchor.absolute = 0;

similarly 2nd script for the componet to anchor & stretch(if required) within the screen i.e. label to topleft , button to right bottom etc .
sprite.SetAnchor(uiRoot.transform);
sprite.leftAnchor.Set(relativeLeftAnchor , leftAnchor); //similarly for right , bottom , top
sprite.ResetAnchors();
sprite.UpdateAnchors();

My mainmenu prefab contains bg sprite with unified custom anchor script(1st script) attached , button 2nd type script attached.

Mainmenu should come on screen with some tween position animation.

for instantiation of mainmenu i am using Nguitool.addchild(parent , object);

what all steps i need to do ?
There can be so many prefab like my mainmenu , which will came inside my game at some point.




Pages: [1] 2