Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@ellioman
Copy link
Contributor

@ellioman ellioman commented May 15, 2020

Purpose of this PR

Backport of #339

@ellioman ellioman requested a review from a team as a code owner May 15, 2020 17:02
@ellioman ellioman requested a review from eh-unity May 15, 2020 17:02
#if UNITY_EDITOR
static readonly string[] s_ShaderGUIDs =
{
"933532a4fcc9baf4fa0491de14d08ed7",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very manual and therefore brittle. Could we have symbolic constants or generate this automatically?

using UnityEditorInternal;
#endif
using System.ComponentModel;
using System.Linq;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use Linq? How does that perform in practice?

int index = (int)id;
if (index < 0 && index >= (int)ShaderPathID.Count)
{
Debug.LogError("Trying to access universal shader path out of bounds");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should print params 'index' and 'count', so there's no need to debug to see what they were.

@ellioman
Copy link
Contributor Author

ellioman commented Jul 6, 2020

Yamato was green before a changelog fix.

@ellioman ellioman merged commit f00125c into 8.x.x/release Jul 6, 2020
@ellioman ellioman deleted the 8.x.x/backports/urp-editorResourcesAsset-loadAndForget branch July 6, 2020 12:48
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.