Skip to content

Conversation

kennytann
Copy link
Contributor

@kennytann kennytann commented Oct 6, 2021


Purpose of this PR

Why is this PR needed, what hard problem is it solving/fixing?

Users are able to set/change sprite mesh in sprite lights using scripting api

https://forum.unity.com/threads/setting-lightcookiesprite-for-light2d-experimental.1117513/#post-7209010


Testing status

Describe what manual/automated tests were performed for this PR

Add a Light2D of Sprite type to the scene.
Create a new script with the following code to test.

public Sprite spriteMesh;
// Start is called before the first frame update
void Start()
{
GetComponent().lightCookieSprite = spriteMesh;
}


Comments to reviewers

Notes for the reviewers you have assigned.

@kennytann kennytann requested a review from unity-cchu October 6, 2021 03:56
@kennytann kennytann self-assigned this Oct 6, 2021
@kennytann kennytann requested review from a team as code owners October 6, 2021 03:56
@github-actions
Copy link

github-actions bot commented Oct 6, 2021

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

URP
/jobDefinition/.yamato%252Fall-urp.yml%2523PR_URP_trunk
With changes to URP packages, you should also run
/jobDefinition/.yamato%252Fall-lightmapper.yml%2523PR_LightMapper_trunk

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions
Copy link

github-actions bot commented Oct 6, 2021

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page).
See the PR template for more information.
Thank you!

@kennytann kennytann requested a review from a team as a code owner October 12, 2021 08:53
@BoonKiangTan
Copy link

API verified on branch:

2022.1.0a12.1604
Revision: trunk 816252c3efbb
Built: Wed, 06 Oct 2021 17:58:29 GMT
Package branch: 2d/sprite-light-settor (2a7950f)

  • Verified no issues with using GetComponent().lightCookieSprite API in runtme
    devenv_wNc1n32Nqg

phi-lira added a commit that referenced this pull request Oct 20, 2021
#5926

commit 2a7950f
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Tue Oct 12 16:51:52 2021 +0800

    Remove check for m_DeprecatedPointLightCookieSprite

commit 25cf985
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Wed Oct 6 11:55:05 2021 +0800

    Update light2d properties and expose settor for sprite light
@phi-lira phi-lira mentioned this pull request Oct 20, 2021
phi-lira added a commit that referenced this pull request Oct 22, 2021
#5926

commit 2a7950f
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Tue Oct 12 16:51:52 2021 +0800

    Remove check for m_DeprecatedPointLightCookieSprite

commit 25cf985
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Wed Oct 6 11:55:05 2021 +0800

    Update light2d properties and expose settor for sprite light
@phi-lira
Copy link
Contributor

Merged on staging branch #6085

@phi-lira phi-lira closed this Oct 22, 2021
@kennytann kennytann deleted the 2d/sprite-light-settor branch October 29, 2021 04:17
unity-emilk pushed a commit that referenced this pull request Nov 7, 2022
Update light2d properties and docs

Backported the following PRs
#5618
#5926
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants