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 /
avatar image
0
Question by lesfundi · Mar 11, 2011 at 03:12 AM · animationspritespritemanagerspritemanager2

The name 'PackedSprite' does not denote a valid type ('not found')

what is that not working. I attached this script on my sprite created by SM2

Blockquote

var speed : float = 0.01; var updown : float = 0.01;

var sprite : PackedSprite = GameObject.GetComponent("PackedSprite");

function Update () {

var translation : float = Input.GetAxis ("Horizontal") * speed; var updown : float = Input.GetAxis ("Vertical") * speed;

translation = Time.deltaTime; updown = Time.deltaTime;

transform.Translate (translation, updown , 0);

if (translation > 0 ) { transform.localScale = Vector3(-1,1,0); sprite.PlayAnim("idle"); }

Blockquote

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Jean-Fabre · Mar 11, 2011 at 06:15 AM

Hi Lesfundi,

Can you double check that you have correctly install SM2? you should have it in your Plugins folder. If not follow the instructions given when you purchased SM2, and you should have the PackedSprite.cs file under Plugins/Sprite scripts/ in your Project view.

It could also be a problem with this script and where it is in your project, since PackedSprite is a cs file and your script is in js, there are some considerations to be aware of. Try to write this script in cs and see if it pass.

check this for full explanation:

http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html

Hope it helps,

Jean

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
avatar image
0

Answer by lesfundi · Mar 11, 2011 at 12:13 PM

indeed. It was in cs but not in Java. So, SM2 only works with cs?

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
avatar image
0

Answer by Brady · Apr 28, 2011 at 07:43 PM

SM2 works with JavaScript, but you have to make sure the SM2 files are where they are put when you originally import the package. That is, all the scripts are grouped under the "Plugins" folder. Also, make sure your own JS scripts which call SM2 aren't inside one of the other "priority" folders like Plugins, Standard Assets, etc. If they are, then it defeats the purpose of having the "Plugins" folder, which makes sure the C# gets compiled before the JS.

If you do that, all should be well.

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

No one has followed this question yet.

Related Questions

error CS1520: Class, struct, with Sprites 3 Answers

Sprite Manager Play animation 0 Answers

SpriteManager 2 pixel perfect blurry and stretched 2 Answers

iOS SpriteManager 2 issue with backgrounds 1 Answer

Stop player movement and play attack animation 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