-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Feature
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: f237dd72b280dd0448185ea64cb2708f, type: 3} | ||
m_Name: CodeOptPro_Version | ||
m_EditorClassIdentifier: | ||
value: Version - v1.1.0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: bb457a5890f062349bb79df41dc0cf36, type: 3} | ||
m_Name: Paths_Action | ||
m_EditorClassIdentifier: | ||
_paths: | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: bb457a5890f062349bb79df41dc0cf36, type: 3} | ||
m_Name: Paths_FixedVar | ||
m_EditorClassIdentifier: | ||
_paths: | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: bb457a5890f062349bb79df41dc0cf36, type: 3} | ||
m_Name: Paths_Var | ||
m_EditorClassIdentifier: | ||
_paths: | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data | ||
- Assets/KamranWali/CodeOptPro/SO_Data |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 447dab68c785c1c4297c553ccb06a4ed, type: 3} | ||
m_Name: False | ||
m_EditorClassIdentifier: | ||
value: 0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 447dab68c785c1c4297c553ccb06a4ed, type: 3} | ||
m_Name: True | ||
m_EditorClassIdentifier: | ||
value: 1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
using KamranWali.CodeOptPro.ScriptableObjects.FixedVars; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace KamranWali.CodeOptPro.Editor | ||
{ | ||
public abstract class BaseCodeOptPro : EditorWindow | ||
{ | ||
[SerializeField] protected FixedStringVar version; | ||
|
||
private string _log; | ||
#region Logo Fields | ||
private bool _isSetLogo; | ||
private Vector2 _scrollPos; | ||
private Texture _texLogo; | ||
private Texture _texLogoName; | ||
private readonly string _logoPath = "KamranWali/CodeOptPro/Images/CodeOptProLogo_Only_500x651"; | ||
private readonly string _logoNamePath = "KamranWali/CodeOptPro/Images/CodeOptProLogo_Name_500x89"; | ||
private GUIStyle _versionStyle; | ||
private readonly int _fontSize = 18; | ||
#endregion | ||
|
||
private void OnGUI() | ||
{ | ||
if (!_isSetLogo) // Condition to set logo | ||
{ | ||
_texLogo = Resources.Load<Texture>(_logoPath); | ||
_texLogoName = Resources.Load<Texture>(_logoNamePath); | ||
_versionStyle = new GUIStyle(); | ||
_versionStyle.fontSize = _fontSize; | ||
_versionStyle.normal.textColor = Color.white; | ||
_isSetLogo = true; | ||
} | ||
|
||
_scrollPos = EditorGUILayout.BeginScrollView(_scrollPos); | ||
InitInput(); | ||
|
||
EditorGUI.BeginDisabledGroup(true); | ||
_log = EditorGUILayout.TextArea(_log); | ||
EditorGUI.EndDisabledGroup(); | ||
|
||
if (_isSetLogo) // Condition to show the logo | ||
{ | ||
GUILayout.Space(30f); | ||
GUILayout.Box(_texLogo, new GUILayoutOption[] { GUILayout.Width(100f), GUILayout.Height(130.2f), GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false) }); | ||
GUILayout.Box(_texLogoName, new GUILayoutOption[] { GUILayout.Width(200f), GUILayout.Height(35.6f), GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false) }); | ||
GUILayout.Space(10f); | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Space(5f); | ||
EditorGUILayout.LabelField(version.GetValue(), _versionStyle); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
EditorGUILayout.EndScrollView(); | ||
} | ||
|
||
/// <summary> | ||
/// This method sets the log message. | ||
/// </summary> | ||
/// <param name="msg">The log message to set, of type string</param> | ||
protected void SetLog(string msg) => _log = msg; | ||
|
||
/// <summary> | ||
/// This method writes to log. | ||
/// </summary> | ||
/// <param name="msg">The message to write, of type string</param> | ||
protected void WriteToLog(string msg) => _log += $"\n{msg}"; | ||
|
||
/// <summary> | ||
/// This method initializes inputs and is called from OnGUI() method. | ||
/// </summary> | ||
protected abstract void InitInput(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.