Skip to content

Commit

Permalink
Merge pull request #20 from Graicc/master
Browse files Browse the repository at this point in the history
Fix button material
  • Loading branch information
Graicc authored Dec 23, 2022
2 parents eb4a09c + d0ffb2d commit 78c9ef1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Utilla/GamemodeSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class GamemodeSelector : MonoBehaviour

ModeSelectButton[] modeSelectButtons = Array.Empty<ModeSelectButton>();

static Material buttonMaterial = Resources.Load<Material>("objects/treeroom/materials/plastic");
Text gamemodesText;

int page;
Expand Down Expand Up @@ -48,7 +47,7 @@ GameObject CreatePageButton(string text, Action onPressed)
{
GameObject button = GameObject.Instantiate(templateButton.transform.childCount == 0 ? fallbackTemplateButton : templateButton);
button.GetComponent<MeshFilter>().mesh = meshFilter.mesh;
button.GetComponent<Renderer>().material = buttonMaterial;
button.GetComponent<Renderer>().material = templateButton.GetComponent<Renderer>().material;
button.transform.parent = templateButton.transform.parent;
button.transform.localRotation = templateButton.transform.localRotation;
button.transform.localScale = Vector3.one * 0.1427168f; // shouldn't hurt anyone for now
Expand Down

0 comments on commit 78c9ef1

Please sign in to comment.