Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

No spotlight on Android

Discussion in '2D' started by acidduck, Jan 8, 2016.

  1. acidduck

    acidduck

    Joined:
    Apr 20, 2014
    Posts:
    12
    Hi!

    Could someone be so kind and post a simple project demonstrating Spotlight on Android using 2DToolkit? I can't get it to work.

    I want to have the spotlight light up in a circle on a large sprite texture. Works fine on iOS using sprite/diffuse as shader on the spritematerial, but on Android the sprite is just black. :(

    Thanks in advance :)
     
    Last edited: Jan 8, 2016
  2. acidduck

    acidduck

    Joined:
    Apr 20, 2014
    Posts:
    12
    Got it working, but not with 2DToolKit, which I need.

    There's a spotlight showing on either a Unity Sprite (Sky_unitysprite) or a tk2dSprite (Sky_unitysprite).

    The weird thing is, that I had to change the z-value of the spotlight to a positive number (and thus, also rotate the spotlight 180degres as well), to make it shine on the tk2dsprite. That way the spotlight shines the opposite way, than the "Unity" one. Why, I wonder?

    The Unity sprite and spotlight shows perfectly on Android, while the tk2dSprite is just black on Android (something to do with the light z-value maybe )
     
    Last edited: Jan 8, 2016
unityunity