x


System.Reflection on iOS in Unity 3

Is System.Reflection available on iOS with Unity 3? and if it is, are there any quirks?

more ▼

asked Aug 29 '10 at 01:58 PM

longshot gravatar image

longshot
29 2 2 6

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

I've been using System.Reflection on iOS with Playmaker and haven't run across any issues.

I remember reading that Emit doesn't work on iOS.

more ▼

answered Jan 27 '11 at 05:04 PM

Alex Chouls gravatar image

Alex Chouls
428 11 15 25

(comments are locked)
10|3000 characters needed characters left

I've been running into problems with it. Where the iPhone crashes when trying to do Assembly.Load

more ▼

answered Feb 17 '11 at 06:05 PM

Paul Ash gravatar image

Paul Ash
1 1 1 3

Assembly load will not work, iOS is AOT compiled not JIT. Also dynamic code adding is forbidden on iOS (and can get your app black listed and your dev account banned if you try to circumvent it), you would have to add scripting if you want to do such a thing, so it uses the same compiled code base all the time

Dec 26 '11 at 05:55 PM Dreamora

Also be careful. If you use code-stripping to reduce the filesize Unity could strip things away you might want to access via reflection. Since reflection is dynamic, Unity can't determine that at compile / build time.

In most cases if you use at least each classname somewhere in a included script there should be no problem, but in some rare cases you could shoot yourself in the foot

Dec 26 '11 at 08:53 PM Bunny83

Or simply look at the documentation, understand what link.xml is for and you are normally safe too :)

Dec 26 '11 at 08:57 PM Dreamora
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1998
x1952
x360
x180

asked: Aug 29 '10 at 01:58 PM

Seen: 2941 times

Last Updated: Dec 26 '11 at 08:57 PM