Hey guys I’m having some trouble finding the info I’m looking for here but the idea is to set a string value to only the first part (before the “(” ). When I run this code I come up with an error. Whats Missing here?
// Use this for initialization
void Start () {
shipName = (gameObject.ToString());
int leftPerentheses = shipName.IndexOf ("(");
shipName = shipName.TrimEnd(leftPerentheses, shipName.Length);
Debug.Log (shipName);
}
Now all I have to do is figure out how to tie 2 strings together into a single return then have it (hopefully) be able to create a new dictionary in my PlayerProperties (Scriptable Object) behavior.
.
Or better yet maybe a single dictionary that uses creative text separation to find the correct data, but either way here’s a link on how to add stings together.