Skip to content

Commit

Permalink
Fix shader color
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleySweet committed Jan 31, 2018
1 parent 325d219 commit 3e7820e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ static class Constants
public static readonly String SEARCH_IS_OVER = "\n Fin de la recherche dites '" + STOP_KEYWORD + "' pour retourner au menu.";
public static readonly String THE_QR_CODE_MEANS = "Le QR code représente : {0}\n Dites '" + STOP_KEYWORD + "' pour retourner au menu";
public static readonly String RESULT_BOX_NAME_PREFIX = "ResultBox";
public static readonly String DEFAULT_MATERIAL_LOCATION = "Resources/unity_builtin_extra/Default-Material.mat";
public static readonly String TEXT_SHADER_LOCATION = "UI/Default/Default UI Material";
public static readonly String DEFAULT_MATERIAL_LOCATION = "/HoloToolkit/Input/Models/Cursor/Materials/lambert1.mat";
public static readonly String TEXT_SHADER_LOCATION = "UI/Default Font";
public static readonly String TEXT_QUITTING_APPLICATION = "Arrêt de l'application";
public static readonly String FINAL_WORD_SEARCH_PROMPT = String.Format("dites '{1}' pour continuer. \n Dites '{0}' pour annuler.\n Dites '{2}' pour corriger", STOP_KEYWORD, VALIDATION_KEYWORD, CORRECTION_KEYWORD);
public static readonly String SEARCHING_FOR_QR_CODES = "Recherche de QR codes en cours";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public static GameObject CreateRectangleMeshObject(this List<Rect> rectangles, T
selectionBox.transform.localPosition = new Vector3(0, 0, 0);
selectionBox.transform.localRotation = new Quaternion(0, 0, 0, 0);
MeshRenderer rend = selectionBox.AddComponent<MeshRenderer>();
rend.materials[0] = Resources.Load(Constants.DEFAULT_MATERIAL_LOCATION, typeof(Material)) as Material;
rend.materials[0] = new Material(Shader.Find("Diffuse"));
rend.materials[0].color = color;
rend.materials[0].shader = Resources.Load(Constants.TEXT_SHADER_LOCATION, typeof(Shader)) as Shader;
Mesh myMesh = selectionBox.AddComponent<MeshFilter>().mesh;
rectangles.DrawRectangleOutline(color, myMesh);

Expand Down

0 comments on commit 3e7820e

Please sign in to comment.