Last updated
Last updated
Support us as a and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our ... become a sponsor today!
Friend profile is a simple implementation of the interface and is used in the prefab examples for and other controls. In most cases you will want to create your own "Friend Profile" UI script and can use the included FriendProfile as an example to get started with.
You can implement the interface on your custom profile script and this will allow all of the other profile related UI tools to work with it. That is you can create a custom profile like this and the , and other friend related controls will be able to work with it thanks to the interface.
The interface requires you to implement two features
The following event is available on the FriendProfile that ships with the kit.
The following describes the definition of the FriendProfile that ships with the kit.
If false then the display name field will get the Nickname if available and Friend name if not. If true then the display name will always be the Friend name and the nickname field will be used for nick if available.
A private field pointing to the RawImage control that will be used to display the user's avatar. This can only be set in the Unity Inspector.
The field and the Apply method are the two required features of the interface. You can use the implementation shown above as a good starting off point adding whatever code your UI requires to the Apply method.
A simple event that is raised when the is loaded to the UI controls. This event has no arguments.
A private field only accessible in the Unity Inspector, you can set this to true and the profile will automatically load the local user's on start.
Defines the options for displaying status messages for the profile in question such as online, offline, if they are in a game or other game and rather or not the other game should be named. This uses the sub struct.
The settings and options for displaying the user's name, this uses the sub struct.
The settings and options for displaying the user's nick name, this uses the sub struct.
The settings and options for displaying the user's status as text, this uses the sub struct.
The settings and options for displaying the user's status as an image, this uses the sub struct.
The settings and options for displaying the user's friend ID, this uses the sub struct.
The settings and options for displaying the user's status as text, this uses the sub struct.
The settings and options for displaying the user's status as a change in panel, this uses the sub struct.