Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
UploadedCode
Finished code a while ago but never pushed to github
- Loading branch information
Showing
3,700 changed files
with
6,276 additions
and
21,117 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": "1.0", | ||
"components": [ | ||
"Microsoft.VisualStudio.Workload.ManagedGame" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
using UnityEngine; | ||
using UnityEditor; | ||
|
||
public class ColorEditor : ScriptableWizard | ||
{ | ||
//makes two colors that I can call back to later | ||
Color mainColor; | ||
Color customColor; | ||
//makes it so I can find this tool in the My tools bar | ||
[MenuItem("My Tools/Color Editor")] | ||
public static void ShowWindow() | ||
{ | ||
//opens only one window | ||
GetWindow<ColorEditor>("Color Editor"); | ||
} | ||
|
||
void OnGUI() | ||
{ | ||
//finds the color changer script, which allows me to get all of the scripts and objects attached | ||
ColorChanger cChange = FindObjectOfType<ColorChanger>(); | ||
//links the ogColor from the color changer script to the main Color so I can change it in the tool | ||
mainColor = cChange.ogColor; | ||
cChange.ogColor = EditorGUILayout.ColorField("Color", mainColor); | ||
//makes it so I can access the renderers, because the get component is called in the start function | ||
cChange.Start(); | ||
|
||
|
||
GUILayout.BeginHorizontal(); // groups monochromatic button and analogous button on same row | ||
if (GUILayout.Button("Monochromatic")) | ||
{ | ||
//calls monochromatic function on button press, all other buttons do same thing respectively to their function | ||
cChange.Monochromatic(); | ||
} | ||
if (GUILayout.Button("Analogous")) | ||
{ | ||
cChange.Analogous(); | ||
} | ||
GUILayout.EndHorizontal(); | ||
|
||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Complementary")) | ||
{ | ||
cChange.Complementary(); | ||
} | ||
if (GUILayout.Button("Split Complementary")) | ||
{ | ||
cChange.SplitComp(); | ||
} | ||
GUILayout.EndHorizontal(); | ||
|
||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Triad")) | ||
{ | ||
cChange.Triad(); | ||
} | ||
if (GUILayout.Button("Square")) | ||
{ | ||
cChange.Square(); | ||
} | ||
GUILayout.EndHorizontal(); | ||
|
||
//lets choice of own custom color | ||
customColor = EditorGUILayout.ColorField("Custom Color", customColor); | ||
if (GUILayout.Button("Customize")) | ||
{ | ||
//every box that is selected will be changed when the button is pressed | ||
//and will be changed to the custom color that is currently selected | ||
foreach (GameObject obj in Selection.gameObjects) | ||
{ | ||
//makes sure object has renderer before changing color | ||
Renderer renderer = obj.GetComponent<Renderer>(); | ||
if (renderer != null) | ||
{ | ||
//changes the color to the custom color | ||
renderer.sharedMaterial.color = customColor; | ||
} | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.