-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
tsyu12345
committed
Mar 13, 2024
1 parent
8a0c975
commit bbac30a
Showing
7 changed files
with
53 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
/// <summary> | ||
/// オブジェクトの操作には関係ないが、汎用的な処理をまとめたクラス | ||
/// </summary> | ||
public class Utils : MonoBehaviour { | ||
|
||
/// <summary> | ||
/// 文字列データをVector3に変換します | ||
/// </summary> | ||
/// <param name="vectorString">(x, y, z)のVector3文字列</param> | ||
/// <returns>Vector3 データ</returns> | ||
public static Vector3 ConvertStringToVector3(string vectorString) { | ||
vectorString = vectorString.TrimStart('(').TrimEnd(')'); | ||
string[] sArray = vectorString.Split(','); | ||
|
||
Vector3 result = new Vector3( | ||
float.Parse(sArray[0]), | ||
float.Parse(sArray[1]), | ||
float.Parse(sArray[2]) | ||
); | ||
|
||
return result; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.