Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ZepicZorua · Oct 31, 2015 at 05:33 PM · multiplayercustomization

Customizing multi player

Hi my game is both single and multi player. I have separate models for my single player but for online gameplay I want to give the ability to players to create their own avatars. They can either use what I give them or upload their own from something like maya or blender. How would I make this possible. I've finished the single player but this multi player stuff is new to me. Thx

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ZepicZorua · Oct 31, 2015 at 05:39 PM 0
Share

Something like how you can import $$anonymous$$inecraft skins into the game. This is my first question here so I'm not sure how this works lol

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Statement · Oct 31, 2015 at 06:27 PM

Welcome. Please try to ask one question per thread. Googling for minecraft skins told me they were located at http://skins.minecraft.net/MinecraftSkins/<USERNAME>.png.

Here's an example of a script that downloads a skin for a particular user and optionally sets the texture of the renderers material to that texture.

 using System;
 using System.Collections;
 using UnityEngine;
 using UnityEngine.Events;
 
 public class DownloadMinecraftSkin : MonoBehaviour
 {
     public string username = "Statement";
     public bool applySkinToRenderer = true;
     public Texture2DEvent onDownloaded;
     public ErrorEvent onError;
 
     [HideInInspector]
     public Texture2D skin;
 
     const string urlformat = "http://skins.minecraft.net/MinecraftSkins/{0}.png";
     public string url { get { return string.Format(urlformat, username); } }
 
     IEnumerator Start()
     {
         using (WWW www = new WWW(url))
         {
             yield return www;
             if (string.IsNullOrEmpty(www.error))
                 OnDownloaded(www.textureNonReadable);
             else
                 OnError(www.error);
         }
     }
 
     void OnDownloaded(Texture2D skin)
     {
         if (applySkinToRenderer)
         {
             Renderer renderer = GetComponent<Renderer>();
             if (renderer && renderer.sharedMaterial)
                 renderer.material.mainTexture = skin;
             else
                 Debug.LogError("Missing renderer or material", this);
         }
         onDownloaded.Invoke(skin);
     }
 
     void OnError(string error)
     {
         Debug.LogErrorFormat(this, "Downloading minecraft skin '{0}' failed: '{1}'", username, error);
         onError.Invoke();
     }
 }
 
 [Serializable]
 public class Texture2DEvent : UnityEvent<Texture2D> { }
 
 [Serializable]
 public class ErrorEvent : UnityEvent { }
Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ZepicZorua · Oct 31, 2015 at 06:34 PM 0
Share

Thank you. I can definitely use this, but is there a way a player could make his or her own model in blender or maya and import it in for multiplayer use. If not, the information you gave me will be beneficial for my game

avatar image Statement · Oct 31, 2015 at 06:45 PM 0
Share

Yes, it's possible. However you need a mechanism for distributing the content to the players. Unity has no built in support for loading non-unity asset files at runtime so you need to parse the model files yourself, or convert it into an asset bundle from a server/service running Unity that can import the model & squeeze out an asset bundle. See also Loading Resources at Runtime

I don't know what 3rd party plugins there are. A quick google for "unity load blender file at runtime" landed me at this plugin via a forum post. I do not promote or endorse this particular asset and can neither recommend you to use it or avoid it. What I mean is that you can find solutions for pretty much anything and this was the first example that popped up. Some of them are free, some of them you have to pay for.

avatar image ZepicZorua · Oct 31, 2015 at 06:56 PM 0
Share

Thank you, u have been a big help

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

43 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Modifying Unity Network Lobby 0 Answers

Using Transform Component and selfmade interface in an Network Command ? 0 Answers

Networking Pushing 0 Answers

How Can I create VOIP for two players to communicate over voice while playing or is it even possible in unity? 0 Answers

An Object Reference is required to access non-static member in a Multiplayer game,'Object Reference Required to acces Non-Static Member' Networking 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges