Skip to content

Commit c7d6e52

Browse files
committed
refactor(UI): Rename toggle to switch
1 parent 8b9ead4 commit c7d6e52

22 files changed

+68
-65
lines changed

Assets/JCSUnity/Resources/UI/Toggle/JCS_Toggle.prefab renamed to Assets/JCSUnity/Resources/UI/Toggle/JCS_Switch.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GameObject:
2525
- component: {fileID: 114110209613854866}
2626
- component: {fileID: 114352368772347656}
2727
m_Layer: 5
28-
m_Name: JCS_Toggle
28+
m_Name: JCS_Switch
2929
m_TagString: Untagged
3030
m_Icon: {fileID: 0}
3131
m_NavMeshLayer: 0

Assets/JCSUnity/Resources/UI/Toggle/JCS_Toggle.prefab.meta renamed to Assets/JCSUnity/Resources/UI/Toggle/JCS_Switch.prefab.meta

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Assets/JCSUnity/Scenes/Demo/GUI/JCS_Toggle/LightingData.asset renamed to Assets/JCSUnity/Scenes/Demo/GUI/JCS_Switch/LightingData.asset

File renamed without changes.

Assets/JCSUnity/Scenes/Demo/GUI/JCS_Toggle/LightingData.asset.meta renamed to Assets/JCSUnity/Scenes/Demo/GUI/JCS_Switch/LightingData.asset.meta

File renamed without changes.

Assets/JCSUnity/Scenes/Demo/GUI/JCS_Toggle/ReflectionProbe-0.exr renamed to Assets/JCSUnity/Scenes/Demo/GUI/JCS_Switch/ReflectionProbe-0.exr

File renamed without changes.

Assets/JCSUnity/Scenes/Demo/GUI/JCS_Toggle/ReflectionProbe-0.exr.meta renamed to Assets/JCSUnity/Scenes/Demo/GUI/JCS_Switch/ReflectionProbe-0.exr.meta

File renamed without changes.

Assets/JCSUnity/Scripts/SaveLoad/JCS_AppData.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
* $Notice: See LICENSE.txt for modification and distribution information
77
* Copyright (c) 2020 by Shen, Jen-Chieh $
88
*/
9+
using System;
910
using UnityEngine;
1011

1112
namespace JCSUnity
1213
{
1314
/// <summary>
1415
/// Base application data structure.
1516
/// </summary>
16-
[System.Serializable]
17+
[Serializable]
1718
public abstract class JCS_AppData
1819
{
1920
/* Variables */
@@ -27,16 +28,18 @@ public abstract class JCS_AppData
2728

2829
/* Functions */
2930

30-
protected void InitJCSFile()
31+
protected void InitFile()
3132
{
32-
if (JCS_PackageDataSettings.instance == null)
33+
var pds = JCS_PackageDataSettings.instance;
34+
35+
if (pds == null)
3336
{
3437
JCS_Debug.LogError("Failed to load the copyright and version text");
3538
return;
3639
}
3740

38-
Copyright = JCS_PackageDataSettings.instance.CopyrightString;
39-
Version = JCS_PackageDataSettings.instance.VersionString;
41+
Copyright = pds.CopyrightString;
42+
Version = pds.VersionString;
4043

4144
this.mInitialized = true;
4245
}
@@ -49,6 +52,9 @@ public bool Initialized()
4952
return this.mInitialized;
5053
}
5154

55+
/// <summary>
56+
/// Save the data.
57+
/// </summary>
5258
public abstract void Save<T>(string filePath, string fileName);
5359
public abstract void Save<T>(string fullFilePath);
5460

0 commit comments

Comments
 (0)