Last active
December 15, 2015 10:59
-
-
Save kjlape/5249719 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| //Goes into OnContentLoaded() | |
| MaterialGroup material = (MaterialGroup)_boardGroup.Find<Surface>().Material; | |
| DiffuseMaterialPart materialPart = (DiffuseMaterialPart)((MaterialPaintGroup)material.MaterialParts | |
| .First(x => x.Name == "ground").MaterialGroup.MaterialParts | |
| .First()).MaterialParts.First(); | |
| _boardTexture = materialPart.Texture; |
This file contains hidden or 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
| <!--Goes into Surface | |
| Remember to delete the BasicMaterial! | |
| --> | |
| <MaterialGroup> | |
| <MaterialPaintGroup.MaskTextures> | |
| <Splatter> | |
| <ExternalReference /> | |
| </Splatter> | |
| </MaterialPaintGroup.MaskTextures> | |
| <MaterialPaintGroup Name="ground"> | |
| <DiffuseMaterialPart Texture="{ContentReference Assets/MainBoard}"/> | |
| </MaterialPaintGroup> | |
| <!--Fixes mysterious null reference bug. Should investigate later.--> | |
| <DeferredLightsMaterialPart /> | |
| </MaterialGroup> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment