Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
2
Question by justinsegler · Feb 11, 2016 at 09:53 AM · scripting problemwwwmovietextureplaymode

MovieTexture not playing in playmode

I can't seem to load in a movietexture from file, attach it as a movietexture to a prefab instance (created via script upon opening of Unity), and play it in edit mode. I can do two things: 1) I can get the texture to play in edit mode. The movie I'm importing is already in ogv format. So I simply am able to attach it to the prefab and play the texture, triggered by my script. However, this is all done in edit mode, not play mode 2) I can import the texture as an mp4 movie texture and assign it as a texture to my prefab. In this case, I can not get it to play in edit mode and when I enter play mode, I get the following error

LoadMoveData got NULL! UnityEngine.MovieTexture:Play()

However, my movie is already imported into the project as an asset so it should not be null.

Can anyone assess the issue?? My code is as follows:

using UnityEditor; using UnityEngine; using System.Collections;

[ExecuteInEditMode] class MyEditorScript : MonoBehaviour {

 static void Start()
 {

     if (Application.isPlaying)
         return;
     Debug.Log ("Test");
     Vector3 position = new Vector3(0, 0, 0);
     Vector3 scale = new Vector3 (10, 10, 10);
     GameObject newSphere = (GameObject)Instantiate (Resources.Load("360 Video Player"));
     newSphere.name = "360 Video Player";
     newSphere.transform.position = position;
     newSphere.transform.localScale = scale;
     WWW diskTex = new WWW ("file:///C:\\...\\Video.ogv");
     MovieTexture tex1 = diskTex.movie;
     while (!tex1.isReadyToPlay) {

     }
     MovieBehaviorScript mov = newSphere.GetComponent<MovieBehaviorScript> ();
     mov.movTexture = tex1;
     Renderer ren = newSphere.GetComponent<Renderer>();
     ren.sharedMaterial.mainTexture = tex1;
     UnityEditor.EditorApplication.ExecuteMenuItem("Edit/Play");
     tex1.Play ();
 }

}

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DantaliaN · Jun 24, 2016 at 02:59 AM

https://issuetracker.unity3d.com/issues/movietexture-fmod-error-when-trying-to-play-video-using-www-class

Comment
Add comment · 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

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

Issues with video player coroutine 2 Answers

Whenever I try to enter playmode after creating a script, a compiler error pops up 0 Answers

Unity Collab breaks Play Mode 0 Answers

C# Scripts Error 1 Answer

Scrpits component disappears when I enter playmode 0 Answers


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