docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IIpValidator

    Provides methods for validating and parsing IP addresses.

    Namespace: Unity.Services.Multiplayer
    Assembly: Unity.Services.Multiplayer.dll
    Syntax
    public interface IIpValidator

    Methods

    IsValidIPAddress(string)

    Checks if the given string is a valid IP address (IPv4 or IPv6).

    Declaration
    bool IsValidIPAddress(string ip)
    Parameters
    Type Name Description
    string ip

    The IP address string to validate.

    Returns
    Type Description
    bool

    Returns true if the IP address is valid; otherwise, false.

    TryParseIPAddress(string, out NetworkEndpointAddress)

    Attempts to parse the given string as an IP address.

    Declaration
    bool TryParseIPAddress(string ip, out NetworkEndpointAddress endpoint)
    Parameters
    Type Name Description
    string ip

    The IP address string to parse.

    NetworkEndpointAddress endpoint

    When this method returns, contains the parsed NetworkEndpointAddress if the parse succeeded; otherwise, the default value.

    Returns
    Type Description
    bool

    Returns true if the IP address was successfully parsed; otherwise, false.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)