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

Pages: [1]
1
I know it doesn't make any sense. :)

If I write it out with Debug, it write null when it's private, and when it's public it writes the name of the collection on the GameObject..... I have no clue why it does that.

2
Why will the following code give me a null ref exception:

Code: [Select]
    private tk2dSpriteCollection sCollection;

// Use this for initialization
void Start ()
{
        sCollection.spriteCollection = GetComponent<tk2dSprite>().Collection;   
}

And the following code doesn't give me an exception, I'm not assigning anything to the public object, the only thing I'm doing is changing the access modifiers from private to public...

Code: [Select]
    public tk2dSpriteCollection sCollection;

// Use this for initialization
void Start ()
{
        sCollection.spriteCollection = GetComponent<tk2dSprite>().Collection;
}

3
Support / Re: Can't open SpriteCollection editor
« on: June 13, 2013, 12:27:06 pm »
The problem is solved.

I had more screens conneced to to my computer but the "Sprite Collection editor" wasn't showing up on any of my desktops, not even after a Factory reset. The "Sprite animation editor" popped back to my main screen after each reset even if I moved it outside my screen bounds.

Not untill I stopped extending my desktop to the other screens and did a factory rest with only 1 desktop I got the "Sprite Collection editor" back.

Thanks for the quick response and the factory reset solution :)


4
Support / Re: Can't open SpriteCollection editor
« on: June 13, 2013, 10:28:07 am »
I'm not getting any errors in the console.

The window doesn't open on any other monitors.

I tried to reset the layout and that didn't help either..

I redownloaded the package and that didn't fix the problem either.

I think I'm going to reinstall unity to see if it has any effect.

EDIT: Reinstalling didn't help, I have no idea why it won't show up.

5
Support / Can't open SpriteCollection editor
« on: June 13, 2013, 09:44:54 am »
When I select a sprite collection prefab and click the "Open Editor" button nothing happens. The editor simply won't open.
I tried to create a new Unity project and reimport everything but that didn't solve the problem.

Note: I have no problems opening the SpriteAnimation editor & I'm using version 2.0.

How do I solve this problem?

6
Support / Re: Collider size is set to 0 when image is changed on sprite
« on: February 17, 2012, 02:35:40 pm »
that solved the issue, thanks a lot :)

7
Support / Collider size is set to 0 when image is changed on sprite
« on: February 17, 2012, 12:36:22 am »
Hello, I have a sprite and I ticked the create collider. It creates a box collider on my sprite.
I set this collider to the size I want it, but whenever I run my game and the sprite is animating, it sets the size of my sprite to 0,0,0.

Can anyone help me solve this issue.

Thx in advance :)

8
Support / Re: Animating multiple sprites with the same script
« on: February 17, 2012, 12:19:25 am »
I solved the issue, my tk2dAnimatedSprite was static, thats why it only reacted on one of my sprites....

9
Support / Animating multiple sprites with the same script
« on: February 16, 2012, 06:52:05 pm »
Hello, I need some help animating 2 sprites with the same script. Right now I have 2 enemy sprites I wan't to animate with the same script. The method that moves and animates them looks like this:

Code: [Select]
    void MoveToPlayer()
    {
        if (enemyTransform.localPosition.x >= player.transform.localPosition.x)
        {
            enemySpeed = 5;
            enemyTransform.Translate(Vector3.left * amountToMove, Space.World);
            anim.Play("WalkLeft");

        }
        else if (enemyTransform.localPosition.x <= player.transform.localPosition.x)
        {
            enemySpeed = 5;
            enemyTransform.Translate(Vector3.right * amountToMove, Space.World);
            anim.Play("WalkRight");
           
        }
    }

The problem is that if I add this script to both my sprites it only animates one of them, the other just moves without any animation. Some help with this issue would really be appreciated.

Thanks in advance :)


Pages: [1]