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 /
avatar image
2
Question by MasterGalaxy · Oct 05, 2015 at 09:08 PM · instantiatenetworknetwork.instantiate

Network Instantiate error even when connected?

So I've been fighting with this simple script I've made which is supposed to fire a small projectile when the fire button is hit. Problem is, it doesn't instantiate and instead throws an error:

"Failed Network.Instantiate because we are not connected."

Thing is, I'm running a server and client side by side on my screen and they are connected. I can tell because both characters are plainly visible and respond to their individual inputs.

Here's a snippet from my code, the part that I suspect may be the issue...

 if(isLocalPlayer){
     if(Input.GetButtonDown(FireButton)){
         Network.Instantiate(Ammo, GunSpot.position,GunSpot.rotation,0);
                 
     }
 }

I'm new to the whole uNET, so any advice would be greatly appreciated.

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 MasterGalaxy · Oct 06, 2015 at 12:26 AM 0
Share

Come on people, nothing?

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Bunny83 · Oct 06, 2015 at 01:53 AM

"Network.Instantiate" belongs to the old networking system. Didn't you get some obsolete warnings?

If you're new to the new networking system i suggest start reading from here. The most important parts for your issue is most likely covered in Object Spawning and maybe Scene Objects. However i suggest to read though everything (maybe a couple of times).

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 MasterGalaxy · Oct 06, 2015 at 11:31 PM 1
Share

Thanks! I didn't get any obsolete warning at all, but this makes sense now. I was running a little low on sleep and wasn't thinking straight I suppose. Thanks for the help and friendly advice!

avatar image svendkiloo · Apr 29, 2016 at 11:12 AM 1
Share

Doesn't look obsolete here:

http://docs.unity3d.com/ScriptReference/Network.Instantiate.html

avatar image Em3rgency · May 03, 2016 at 05:49 PM 0
Share

I'm with svendkiloo here. The old and new systems both still work, but it is SO ANNOYING when it doesn't say anywhere in the documentation which classes/methods belong to which system.

Unity's documentation is already horrible enough without having to deal with multiple networking systems with no clear delineation.

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

33 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

Related Questions

Network.instantiate only works for Server to client 0 Answers

Instantiate a random item at a random position 1 Answer

Network.Instantiate c# issues 1 Answer

Network.Instantiate spawns multiple objects 2 Answers

Network.Instantiate only Instantiates on one client. 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