Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Editor templates for projects with UNITY_EDITOR define #2090

Merged
merged 2 commits into from
May 18, 2021

Conversation

van800
Copy link
Contributor

@van800 van800 commented May 17, 2021

https://jetbrains.slack.com/archives/C53QFRZ7G/p1620924775194600

When we have asmdef with Editor
"includePlatforms": [
"Editor",
],
UNITY_EDITOR define is in the csproj

Otherwise - when asmdef either exсludes Editor or doesn't include it - UNITY_EDITOR define is not in the csproj
"excludePlatforms": [
"Editor"
]

Assembly-CSharp and Assembly-CSharp-firstpass contain UNITY_EDITOR define, however Editor api-s compilation would fail.
If Player projects generation is enabled - those Player projects would not contain UNITY_EDITOR define.

@van800 van800 requested a review from citizenmatt May 17, 2021 10:46
@van800 van800 self-assigned this May 17, 2021
Copy link
Member

@citizenmatt citizenmatt left a comment

Choose a reason for hiding this comment

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

I think this is too broad - since UNITY_EDITOR is defined for all projects that are open in the editor, this means we'll show editor templates in runtime code for packages and assembly definitions. But I think it's better than not showing them at all for these projects.

@van800 van800 merged commit 0702918 into net212 May 18, 2021
@van800 van800 deleted the net212-templates branch May 18, 2021 08:58
@citizenmatt citizenmatt added this to the Rider 2021.2 milestone May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants