Method TryParseObject
TryParseObject(string, out NwObject?)
Tries to resolve the specified GameObject ID string to an object. A return value
indicates whether the conversion succeeded or failed.
This is the temporary ID created from ToString(). See ToNwObject(Guid) to parse persistent UUIDs.
public static bool TryParseObject(this string objectIdString, out NwObject? result)
Parameters
objectIdStringstringThe object ID string to parse.
resultNwObjectWhen this method returns, contains the object referenced by the number contained in objectIdString, if the conversion succeeded, or null if the conversion failed. The conversion fails if the s parameter is null or System.String.Empty, is not in a format compliant with style, or represents an invalid object reference.
Returns
- bool
true if objectIdString was converted successfully; otherwise, false.
TryParseObject<T>(string, out T?)
Tries to resolve the specified GameObject ID string to an object. A return value
indicates whether the conversion succeeded or failed.
This is the temporary ID created from ToString(). See ToNwObject(Guid) to parse persistent UUIDs.
public static bool TryParseObject<T>(this string objectIdString, out T? result) where T : NwObject
Parameters
objectIdStringstringThe object ID string to parse.
resultTWhen this method returns, contains the object referenced by the number contained in objectIdString, if the conversion succeeded, or null if the conversion failed. The conversion fails if the s parameter is null or System.String.Empty, is not in a format compliant with style, or represents an invalid object reference.
Returns
- bool
true if objectIdString was converted successfully; otherwise, false.
Type Parameters
T