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.


Topics - CoderBear

Pages: [1]
1
Support / [URGENT] WTF Sprite being destroyed when visible?
« on: May 22, 2013, 10:56:28 pm »
Ok so this happened today within about a couple of hours prior to this post.  I have a sprite that is kept invisible until an effect makes it visible (NGUI 11).  When the game runs all seems to be well (NGUI 12).  BUt you press the button with a shield and S on it and suddenly...
the object may appear for a split second and then immediately disappear and gets detroyed (NGUI 13).  My question is why is this happening and why is this the only sprite affected.

Unity: 4.1.2f
2Dtk: 1.92 + Patch 1

Before you go accusing me of destroying.  this is the only piece of code "I wrote" that touches the sprite.  Please note that sprite is the Shield Sprite, and icon is the Button Sprite.

The weird thing is this just happened randomly.

Code: [Select]
public void clickedFA ()
{
// tracker.AddProgressToAchievement ("Shielded", 1.0f);
// StoreInventory.TakeItem (itemId, 1);

// balance = StoreInventory.GetItemBalance (itemId);
balance--;
textMesh.text = balance.ToString ();
textMesh.Commit ();

icon.color = Color.gray;
cooldownActive = !cooldownActive;

Invoke("ResetIcon", 5);  // cooldown in 5 seconds.
ActivateShield();
}

private void ActivateShield() {
sprite.gameObject.SetActive(true);
Invoke("DectivateShield", 3); // last 3 seconds
}

private void DectivateShield() {
sprite.gameObject.SetActive(false);
}

2
Support / Wierd Disappearing Sprite issue.
« on: April 28, 2013, 12:46:05 am »
OK I have this really weird issue going on when running on Android Devices (any of them).  There 4 buttons using the button UI.  The pause button when pressed for some reason it disappears when it is touched.

I showed how it is setup in the editor and the other pictures show one of the other 3 buttons that aren't affected.  The code it calls simple sets 2 bool variables.

Code: [Select]
public class PauseButton : MonoBehaviour {

public TimerCountdown script;

void OnClick() {
script.timerActive = !script.timerActive;
script.gamePaused = !script.gamePaused;
}
}

One thing to note is it seems to happen once the player starts moving.  and as I noted above and must stress this...

This is the ONE and ONLY button that is having this problem and I really DON'T know what is happening.  I need some help ASAP as this is holding me up from release.

3
Support / Wierd Undrawn sprite issue (Unity remote vs From Device)
« on: April 02, 2013, 09:13:11 pm »
When running the game on a device via the editor/Unity Remote combo the whole picture all elements render properly  (see 2DTK001 and 002 attached).  However... when you push it to the device and run it directly from there I get the following issue.

The background images and foreground images are no longer displaying.  The only things displaying are as show in the third picture?
Why is this happening?  There should be no difference between running this via unity remote and on the device.  Especially if the project is set to android.

Pages: [1]