Hello,
I want to change player avatar with downloaded image.
Can anyone please share me how to change avatar to player (#1 id)?
Thank you.
Avatar from internet
Re: Avatar from internet
Hi,
There are two or three steps:
1. Download the image from the Internet as a texture. See Retrieving a Texture from an HTTP Server (GET)
2. Convert the texture to a sprite. Example:
3. Assign the sprite to the actor. Example:
There are two or three steps:
1. Download the image from the Internet as a texture. See Retrieving a Texture from an HTTP Server (GET)
2. Convert the texture to a sprite. Example:
Code: Select all
Sprite sprite = PixelCrushers.DialogueSystemUITools.CreateSprite(yourDownloadedTexture2D);
Code: Select all
DialogueManager.masterDatabase.GetActor("Player").spritePortrait = sprite;
-
- Posts: 6
- Joined: Sun Oct 29, 2023 5:05 pm
Re: Avatar from internet
Thank you very much dude. Hope one day you open discord server.
Have nice week..
Have nice week..
Re: Avatar from internet
There's a link to the Discord server in the Dialogue System's _README.txt file.
Discord is good for discussion, but forums are better for questions because it's easier to search for previously-answered questions. Also, here on the forum you can search for "HOWTO" plus a question to get useful how-to articles.
Discord is good for discussion, but forums are better for questions because it's easier to search for previously-answered questions. Also, here on the forum you can search for "HOWTO" plus a question to get useful how-to articles.