Skip to content

Commit

Permalink
SKCell v0.14.1 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyrim07 committed Nov 5, 2023
1 parent d6e2d54 commit be60964
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 17 deletions.
11 changes: 11 additions & 0 deletions Assets/SKCell/Attributes/SKMonoAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ public SKFieldAliasAttribute(string message)
Message = message;
}
}

[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
public class SKInspectorTextAttribute : PropertyAttribute
{
public string Message { get; }

public SKInspectorTextAttribute(string message)
{
Message = message;
}
}
}
2 changes: 1 addition & 1 deletion Assets/SKCell/Core/SKCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace SKCell
[AddComponentMenu("SKCell/SKCore")]
public sealed class SKCore : MonoSingleton<SKCore>
{
public const string SKCELL_VERSION = "v0.14.0";
public const string SKCELL_VERSION = "v0.14.1";

public static Action Awake000 = new Action(EmptyAction), Awake100 = new Action(EmptyAction),
Start000 = new Action(EmptyAction), Start100 = new Action(EmptyAction), Start200 = new Action(EmptyAction),
Expand Down
4 changes: 2 additions & 2 deletions Assets/SKCell/Dialogue/Dialogue 101.asset
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ MonoBehaviour:
uid: 366131
rect:
serializedVersion: 2
x: 1223.1111
y: 979.8889
x: 1242.1111
y: 982.8889
width: 100
height: 80
oRect:
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Dialogue/Dialogue 101.asset.meta

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

12 changes: 9 additions & 3 deletions Assets/SKCell/Editor/Dialogue/SKDialogueEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ private void OnEnable()
{
Init();
}


private void OnBecameVisible()
{
InitializeGUIStyles();
}

private void OnLostFocus()
{
Expand Down Expand Up @@ -162,15 +166,14 @@ private void InitializeGUIStyles()
inspector_buttonStyle.normal.textColor = COL_TITLE;
inspector_buttonStyle.hover.background = MakeTex(2, 2, new Color(.3f, .3f, .3f, 0.9f));
inspector_buttonStyle.hover.textColor = new Color(1f, .95f, .5f, 0.6f);
}
}

public void SaveAsset()
{

}
public void LoadAsset(SKDialogueAsset asset)
{
InitializeGUIStyles();
if (asset == null)
{
this.asset = null;
Expand Down Expand Up @@ -391,6 +394,9 @@ void DrawInspector()
}
void DrawNode(SKDialogueEditorNode node, int id)
{
if (node == null)
return;

node.rect = GUI.Window(id, node.rect, DrawNodeWindow,node.name);

Rect iconRect = new Rect(node.rect.x-20, node.rect.y-20, 25, 25);
Expand Down
15 changes: 14 additions & 1 deletion Assets/SKCell/Editor/SKAttributeDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void SetPropertyValue(SerializedProperty property, object value)


[CustomPropertyDrawer(typeof(SKFieldAliasAttribute))]
public class SKInspectorTextDrawer : PropertyDrawer
public class SKFieldAliasDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
Expand All @@ -124,6 +124,19 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
EditorGUI.LabelField(position, textAttribute.Message);
EditorGUI.PropertyField(position, property,true);
}
}

[CustomPropertyDrawer(typeof(SKInspectorTextAttribute))]
public class SKInspectorTextDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
SKInspectorTextAttribute textAttribute = (SKInspectorTextAttribute)attribute;

position.height = GetPropertyHeight(property, label) * 2;
EditorGUI.LabelField(position,textAttribute.Message);
EditorGUILayout.Space(GetPropertyHeight(property, label));
}

public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
Expand Down
4 changes: 4 additions & 0 deletions Assets/SKCell/Editor/SKFolderIconSetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public class SKFolderIconEditor
{"Scenes", new Color(0.83f, 0.72f,0.61f, 1f)},
{"TextMesh Pro", new Color(0.93f, 0.42f,0.41f, 1f)},
{"StreamingAssets", new Color(0.92f, 0.63f,0.96f, 1f)},
{"Scripts", new Color(0.75f, 0.5f, 1.0f, 1f)},
{"GameLogic", new Color(0.75f, 0.5f, 1.0f, 1f)},
{"Anim", new Color(0.74f, 1.0f, 0.9f, 1f)},
{"Animation", new Color(0.74f, 1.0f, 0.9f, 1f)},
};
static SKFolderIconEditor()
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Graphics/Dissolve_0.shader
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
_MainTex ("Texture", 2D) = "white" {}
_Noise ("Noise", 2D) = "white" {}
_Threshold ("Threshold", range(0,1)) = 0.5
_HighlightThreshold ("Highlight Threshold", float) =1
_HighlightThreshold ("Highlight Threshold", float) = 0.1
}
SubShader
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Graphics/SKDissolveEffect.cs.meta

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

2 changes: 1 addition & 1 deletion Assets/SKCell/Graphics/SKOuterGlowEffect.cs.meta

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

2 changes: 1 addition & 1 deletion Assets/SKCell/Graphics/SKWireframeEffect.cs.meta

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

42 changes: 39 additions & 3 deletions Assets/SKCell/Resources/SKCell/Textures/Noise_Random.png.meta

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

4 changes: 4 additions & 0 deletions Assets/SKCell/Scenes/DemoAssets/AttributesDemo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace SKCell.Test
{
public class AttributesDemo : MonoBehaviour
{
[SKInspectorText("Set the value of the magic number below,\nand use the button above to print it out!")]
[SerializeField]
private byte a;

public int magicNumber = 42;
[SKFolder("Integer Fields")]
public int number1;
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Scenes/SKShaderScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ MeshFilter:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 647554853}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
m_Mesh: {fileID: 4300000, guid: 3dc73593dfbf37b4ba183c7b17d0b18d, type: 3}
--- !u!4 &647554858
Transform:
m_ObjectHideFlags: 0
Expand Down
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SKCell

v0.14.0 by <a href="https://www.alexliugames.com/">Alex Liu</a>
v0.14.1 by <a href="https://www.alexliugames.com/">Alex Liu</a>

SKCell is a powerful, comprehensive utility package for Unity that can greatly enhance your development experience.
Webpage: <a href="https://skyrim07.github.io/SKCell/#/">here</a>
Expand Down Expand Up @@ -3399,6 +3399,10 @@ Select <b>SKCell/Tools/Texture Utils</b> to open the window.
- Added SKVariableMonitor
- Fixed issues with SKTextAnimator
- Fixed issues with SKQuitControl
<br>0.14.1
- Fixed display issues with SKDialogueEditor
- Added new attribute: SKInspectorText
- Added new project folder colors

<b>v0.13.x</b>
2023.10
Expand Down

0 comments on commit be60964

Please sign in to comment.