Skip to content

Commit

Permalink
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
eml17028 committed Sep 28, 2022
1 parent 853d8f0 commit f9b7c85
Show file tree
Hide file tree
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.
6 changes: 6 additions & 0 deletions ToolProject/.vsconfig
@@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}
80 changes: 80 additions & 0 deletions ToolProject/Assets/Editor/ColorEditor.cs
@@ -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;
}
}
}
}
}
11 changes: 11 additions & 0 deletions ToolProject/Assets/Editor/ColorEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 0 additions & 51 deletions ToolProject/Assets/Editor/CreateCharacterWizard.cs

This file was deleted.

11 changes: 0 additions & 11 deletions ToolProject/Assets/Editor/CreateCharacterWizard.cs.meta

This file was deleted.

22 changes: 0 additions & 22 deletions ToolProject/Assets/Editor/SelectAllOfTag.cs

This file was deleted.

11 changes: 0 additions & 11 deletions ToolProject/Assets/Editor/SelectAllOfTag.cs.meta

This file was deleted.

19 changes: 0 additions & 19 deletions ToolProject/Assets/Editor/SpriteProcessor.cs

This file was deleted.

11 changes: 0 additions & 11 deletions ToolProject/Assets/Editor/SpriteProcessor.cs.meta

This file was deleted.

0 comments on commit f9b7c85

Please sign in to comment.