Skip to content

Commit

Permalink
Changed some variable names to fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
TamakiRuri committed Dec 11, 2024
1 parent 19f27ed commit dc61640
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions ItemLockBasic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class ItemLockBasic : UdonSharpBehaviour
[Header("If no object is attached, current object will be automatically set up")]
[Header(" ")]
[SerializeField] private GameObject targetObject;
[SerializeField] private String[] userName;

[SerializeField] private String[] usernames;
[Header("Action Mode[0]アイテムが消える、[1]アイテムが触れなくなる")]
[Header("[1]予めコライダーを無効にするとよりセキュアになります")]
[Header("[0]このスクリプトがオブジェクトにアタッチしたまま無効にしないでください")]
Expand Down Expand Up @@ -66,9 +66,9 @@ private bool UserCheck()
}
else
{
for (int i = 0; i < userName.Length; i++)
for (int i = 0; i < usernames.Length; i++)
{
if (localPlayer == userName[i])
if (localPlayer == usernames[i])
{
return true;
}
Expand Down Expand Up @@ -98,14 +98,14 @@ private void ScriptAction(int mode, bool targetState)
#if UNITY_EDITOR && !COMPILER_UDONSHARP
public void ImportUsernames(String[] importedUsernames)
{
userName = importedUsernames;
usernames = importedUsernames;
Debug.Log("Username Imported");
}


public String[] ExportUsernames()
{
return userName;
return usernames;
}
#endif
}
10 changes: 5 additions & 5 deletions ItemLockCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class ItemLockCenter : UdonSharpBehaviour
{
[SerializeField]private String[] userName;
[SerializeField]private String[] usernames;
[SerializeField]private GameObject[] targetObjects;


Expand Down Expand Up @@ -46,9 +46,9 @@ private bool UserCheck()
}
else
{
for (int i = 0; i < userName.Length; i++)
for (int i = 0; i < usernames.Length; i++)
{
if (localPlayer == userName[i])
if (localPlayer == usernames[i])
{
return true;
}
Expand Down Expand Up @@ -79,11 +79,11 @@ private void ScriptAction(int mode, bool targetState){
}
#if UNITY_EDITOR && !COMPILER_UDONSHARP
public void ImportUsernames(String[] importedUsernames){
userName=importedUsernames;
usernames=importedUsernames;
Debug.Log("Username Imported");
}
public String[] ExportUsernames(){
return userName;
return usernames;
}
#endif
}
10 changes: 5 additions & 5 deletions ItemLockCenterAdvanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ItemLockCenterAdvanced : UdonSharpBehaviour
[Header("Adding or moving objects could potentially break the program")]
[Header("However, the item will be unlocked if a switch enables the object(collider) directly")]
[Header(" ")]
[SerializeField] private String[] userName;
[SerializeField] private String[] usernames;
[SerializeField] private GameObject[] targetObjects;
[SerializeField] private int[] actionMode;
[SerializeField] private bool[] allowInstanceOwner;
Expand All @@ -38,9 +38,9 @@ void Start()
private bool UserListCheck()
{
String localPlayer = Networking.LocalPlayer.displayName;
for (int i = 0; i < userName.Length; i++)
for (int i = 0; i < usernames.Length; i++)
{
if (localPlayer == userName[i])
if (localPlayer == usernames[i])
{
return true;
}
Expand Down Expand Up @@ -83,7 +83,7 @@ private void ScriptAction(GameObject targetObject, int mode, bool targetState, b
#if UNITY_EDITOR && !COMPILER_UDONSHARP
public void ImportUsernames(String[] importedUsernames)
{
userName = importedUsernames;
usernames = importedUsernames;
Debug.Log("Username Imported");
}

Expand Down Expand Up @@ -117,7 +117,7 @@ public void ImportWallModes(bool[] importedWallModes)
// Export Functions (not in use)
public String[] ExportUsernames()
{
return userName;
return usernames;
}

#endif
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ From RC-b7, some variable names are changed. So in case of an update, please mak

There are two types of prefabs. Advanced prefab allow editing modes and the options for allowing instance owner for each object, with a drawback of requiring clicking the Generate Data button every time the object is edited. The prefab without Advanced will let all target objects have the same settings. However, advanced prefab should be unpacked if you want to use it.

右下の+マークを押しユーザー名を入力します。User Nameにあるすべてのユーザーがこのオブジェクトを操作できます
右下の+マークを押しユーザー名を入力します。Usernamesにあるすべてのユーザーがこのオブジェクトを操作できます

Using the + mark at bottom right corner and input usernames for whitelisted users.

Expand All @@ -102,7 +102,7 @@ In the Advanced prefab, you can put any other objects with ItemLockBasic or Item

Drag and drop ItemLockBasic script to target object.

右下の+マークを押してユーザー名を入力してください。User Nameにあるすべてのユーザーがこのオブジェクトを操作できます
右下の+マークを押してユーザー名を入力してください。Usernamesにあるすべてのユーザーがこのオブジェクトを操作できます

Using the + mark at bottom right corner and input usernames for whitelisted users.

Expand Down
Binary file modified Sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed SimpleItemLock-b8.unitypackage
Binary file not shown.
Binary file added SimpleItemLock-b9.unitypackage
Binary file not shown.
4 changes: 2 additions & 2 deletions Udon/AdvancedItemLockCenter.asset
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: userName
Data: usernames
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: userName
Data: usernames
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
Expand Down
4 changes: 2 additions & 2 deletions Udon/ItemLockBasic.asset
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: userName
Data: usernames
- Name: $v
Entry: 7
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: userName
Data: usernames
- Name: <UserType>k__BackingField
Entry: 7
Data: 10|System.RuntimeType, mscorlib
Expand Down
4 changes: 2 additions & 2 deletions Udon/ItemLockCenter.asset
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: userName
Data: usernames
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: userName
Data: usernames
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
Expand Down

0 comments on commit dc61640

Please sign in to comment.