Created
June 1, 2020 01:33
-
-
Save simonwittber/ccec4e76580a6fd20cee7ee80deebd5f to your computer and use it in GitHub Desktop.
Howto: Write package dependent code for Unity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"versionDefines": [ | |
{ | |
"name": "com.unity.render-pipelines.high-definition", | |
"expression": "7.3.1", | |
"define": "USE_HDRP" | |
} | |
], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class SomeBehaviour : MonoBehaviour | |
{ | |
//this method can be defined in other file, or just ignored. | |
partial public void SomeMethod(); | |
void Update() { | |
SomeMethod(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if USE_HDRP | |
public partial class SomeBehaviour : MonoBehaviour | |
{ | |
partial public void SomeMethod() { | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment