Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Cant build to iphone with pro with movie texture?

Discussion in 'iOS and tvOS' started by caseyboundless, Aug 8, 2014.

  1. caseyboundless

    caseyboundless

    Joined:
    Oct 17, 2011
    Posts:
    590
    When I try to build to my iphone i get this in the compiler.

    Assets/Scripts/LonelyHenVideo.cs(11,17): error CS0246: The type or namespace name `MovieTexture' could not be found. Are you missing a using directive or an assembly reference?

    Error building Player because scripts had compiler errors



    But I can play my app in the editor? There are no errors? Any ideas or is this a bug? Using Unity 4.5.2f1 and using c# here is my script.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class LonelyHenVideo : MonoBehaviour {
    5.  
    6.  
    7.     // Use this for initialization
    8.     void Start ()
    9.     {
    10.        
    11.         MovieTexture lonelyHen = renderer.material.mainTexture as MovieTexture;
    12.         lonelyHen.Play ();
    13.         lonelyHen.loop = true;
    14.  
    15.         audio.Play();
    16.     }
    17.  
    18.  
     
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Movie Textures are Pro only. Do you have pro (and iOS Pro)? If not, that's why it only works in the editor.
     
  3. caseyboundless

    caseyboundless

    Joined:
    Oct 17, 2011
    Posts:
    590
    Screen Shot 2014-08-09 at 12.07.40 AM.png
    Yes I have pro ios.
     
  4. caseyboundless

    caseyboundless

    Joined:
    Oct 17, 2011
    Posts:
    590
  5. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  6. caseyboundless

    caseyboundless

    Joined:
    Oct 17, 2011
    Posts:
    590
  7. caseyboundless

    caseyboundless

    Joined:
    Oct 17, 2011
    Posts:
    590
    Figured it out thanks Graham.
     
  8. tolik_aka_gaspar

    tolik_aka_gaspar

    Joined:
    Oct 18, 2014
    Posts:
    1
    How?
     
  9. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  10. Deleted User

    Deleted User

    Guest

    Curious that both Mobile movie texture and Metaio provide iOS movie texture functionality, but it's not native to unity. Doesn't that seem like key feature?
     
  11. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,600
  12. MarkBTS

    MarkBTS

    Joined:
    Jan 8, 2015
    Posts:
    4