Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by jonnycundall · Nov 16, 2014 at 06:30 PM · androiddebug

Certain gameobjects not in mobile build

I'm making a game in unity, targetting android. I have a few gameobjects, which are quads, which have some scripts on them, and the scripts use the dimensions and positions of the quad to procedurally add lots of other objects to make a long fence.

The fence is no longer appearing in the game when I run the built version on my android device, even though it appears fine when the game is run in the editor. After a bit of debugging using adb logcat, I realised that the fence-creating scripts were not running at all. I verified that the reason for that was that the quad objects are not present in the game world (by running a script which searched for one of the gameobjects and wrote the result to the log).

I am stuck now. I'm not sure how to investigate why these particular gameobjects are in the project, and are there when the game is played in the editor, but don't make it to the mobile build. They were there when I was developing a few days ago.

edit: I just tested making a web player build, and that had the same problem.

Comment
Add comment · Show 2
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 pfreema1 · Apr 26, 2017 at 11:26 PM 0
Share

Did you ever figure this one out? I'm having the same problem.

avatar image sandeepsmartest · Apr 27, 2017 at 04:50 AM 0
Share

posting your script may help people to resolve your issue.Also try writing debug log in all your scripts in start or awake().And try debugging log in the manager script which makes instantiation of other gameobjects. hope this may help you at very basic level. Nsks

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Kiwasi · Nov 16, 2014 at 08:45 PM

Assets will be included in the build in one of two cases

  • You have a reference to them in the inspector

  • They are in the resources folder

Otherwise Unity will 'optimise' them out to reduce file size.

For clarification, how are you getting your reference to instantiate the GameObjects? This may give some clue as to which of these solutions is more relevant for your project.

Comment
Add comment · Show 1 · 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 jonnycundall · Nov 16, 2014 at 09:06 PM 0
Share

I think the wording of my question must have been misleading. The objects which are missing in the mobile build are in the inspector both during editing and whilst playing in the editor. I'm not worrying about the game objects I later create procedurally, as those scripts never get to run.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

minSDKVersion on Android? 0 Answers

how to make high quality textures with low size of downlaod 1 Answer

TPS Camera with Joystick (Android) 0 Answers

How to change scenes when pressing sprite 1 Answer


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