Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development

Jason Holt
Jason Holt
10,041 Points

Removing Legacy Support / Refactoring question

There are quite a few warnings related to legacy support of Blackberry and Windows Phone 8 that I would like to remove completely if possible. Does anyone know the process of properly refactoring or re-building the Frog game so that Blackberry/WP8 support is removed? Relatedly - There was a change in particle rendering and a couple of other items that have been updated since the project was originally created. Is there a safe and efficient way to update the code to use the new systems provided by Unity?

3 Answers

Rick Hoekman
Rick Hoekman
9,494 Points

Jason Holt : I also tried to fix the errors by hand but it opened up a whole new 'can of worms'. I'm going to downgrade Unity to the 5.3 version so I can finish the track and try to update/debug after I have gained more knowledge. It's going to be part of the job anyway when using Unity due to the frequent updates they push out.

Rick Hoekman
Rick Hoekman
9,494 Points

In the console click on the line that gives the error and MonoDevelop will open the config script. You can remove the lines that have BlackBerry and WP8 in them.

Though I haven't figured out the deprecated Particle errors yet..

Jason Holt
Jason Holt
10,041 Points

So just to be clear, the OR pipes || and the code related to them can be removed? ... || WP8 || Blackberry, etc.

Rick Hoekman
Rick Hoekman
9,494 Points

If I click on the error and MonoDevelop opens, I see these lines and I just remove the ones that are giving me errors/warnings. (I'm not seeing any lines using those operators you mentioned).

Assets/Scripts/CrossPlatformInput/CrossPlatformInputInitialize.cs

        private static BuildTargetGroup[] buildTargetGroups = new BuildTargetGroup[]
            {
                BuildTargetGroup.Standalone,
                BuildTargetGroup.WebPlayer,
                BuildTargetGroup.Android,
                BuildTargetGroup.iOS,
                BuildTargetGroup.WP8,
                BuildTargetGroup.BlackBerry
            };

        private static BuildTargetGroup[] mobileBuildTargetGroups = new BuildTargetGroup[]
            {
                BuildTargetGroup.Android,
                BuildTargetGroup.iOS,
                BuildTargetGroup.WP8,
                BuildTargetGroup.BlackBerry,
        BuildTargetGroup.PSM, 
        BuildTargetGroup.Tizen, 
        BuildTargetGroup.WSA 
            };
Jason Holt
Jason Holt
10,041 Points

I remove those lines and it worked. However, I am experiencing errors from a standard asset package that state the Particle Emissions systems are depreciated. See the code below:

namespace UnityStandardAssets.Effects
{
    public class ExtinguishableParticleSystem : MonoBehaviour
    {
        public float multiplier = 1;

        private ParticleSystem[] m_Systems;


        private void Start()
        {
            m_Systems = GetComponentsInChildren<ParticleSystem>();
        }


        public void Extinguish()
        {
            foreach (var system in m_Systems)
            {
                system.enableEmission = false;

            }
        }
    }
}

system.enableEmission = false should somehow be changed to emission.enable. But it's more complicated than that. Just need some help updating this.