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 /
This question was closed Jun 26, 2012 at 12:54 PM by tomekkie2 for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by tomekkie2 · Jun 26, 2012 at 06:19 AM · listwebplayersystemcollections

Javascript containing List<> - can not make them work in WebPlayer

I made some scripts with Lists. They work in Editor, but I could not make them work in the WebPlayer. Then I added

 import System.Collections.Generic;

statement in all the scripts using Lists, but that did not help. They still work in the Editor and not in the Webplayer. Any suggestions, please!

Comment
Add comment · Show 5
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 Berenger · Jun 26, 2012 at 06:23 AM 0
Share

Code, please ?

avatar image hijinxbassist · Jun 26, 2012 at 06:25 AM 0
Share

Im surprised it worked w.o the imort sys.coll.gen declaration. As Berenger said, we need some code here..

avatar image tomekkie2 · Jun 26, 2012 at 06:27 AM 0
Share

These are terribly long scripts. I think I have to try to get rid of lists and see if it works.

avatar image tomekkie2 · Jun 26, 2012 at 06:33 AM 0
Share

Basically it just contained data declarations: var palettes: List.; var GUIpalettes: List.; then palettes.IndexOf() to find elements

avatar image tomekkie2 · Jun 26, 2012 at 06:36 PM 0
Share

Thanks to all. Have tracked the reason which was the static batching enabled on the WebPlayer settings, while the scripts were manipulating with meshes and colliders on static object. So the solution was either to uncheck the object static or to disable static batching

1 Reply

  • Sort: 
avatar image
2

Answer by hijinxbassist · Jun 26, 2012 at 06:51 AM

In javascrit(actually unityscipt, but i always hated ppl criticizing me :P) you would add a period before the first carrot

 var palettes:List.<List.<Object> > = new List.<List.<Object> >();

My example is a 2D List which can be turned into a jagged list of any type in javascript(unityscript)

for c#

 var palettes = new List<List<object> >(); //allows for all system types


Maybe the problem is you never construct them? Impossible to tell w/o code, so far so good i guess except the inner List portion, which is a big deal... You must specify the occupying type, easiest being Object (object in C#). This allows for any type of variable to be place into the list.

Comment
Add comment · Show 2 · 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 tomekkie2 · Jun 26, 2012 at 07:06 AM 0
Share

That is exactly how I had it done with just Texture in place of Object The comment field did't display right the code I pasted.

avatar image tomekkie2 · Jun 26, 2012 at 12:53 PM 0
Share

Thank you very much for taking your time anyway. Looks like the reason for the script not working in the WebPlayer is quite different and I am still tracking and getting closer and closer to it.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

A node in a childnode? 1 Answer

List appears null? C# 2 Answers

Lies! You don't need pragma.etc for lists! 1 Answer

Using DLLS in a Webplayer 0 Answers

Webplayer includes some DLL's for no apparent reason 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