• 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 Qand · Jun 27, 2015 at 11:05 PM · c#unity 52dtouch

The type or namespace name `Events' does not exist in the namespace `TouchScript'

Hi,

I'm trying to change somethings in one game in Unity 5.0 but I've got this error : Assets/ButtonMessageBehaviour.cs(15,69): error CS0234: The type or namespace name Events' does not exist in the namespace TouchScript'. (Are you missing an assembly reference?)

Here is the script:

 using TouchScript.Gestures;
 using UnityEngine;
 using System.Collections;
 
 public class ButtonMessageBehaviour : MonoBehaviour {
     
     public GameObject target;
     public string message;
     
     // Use this for initialization
     void Start () {
         GetComponent<PressGesture>().StateChanged += HandleStateChanged;
     }
     
     private void HandleStateChanged (object sender, TouchScript.Events.GestureStateChangeEventArgs e) // CS0234
     {
         if(e.State == Gesture.GestureState.Ended){
             target.SendMessage(message, SendMessageOptions.RequireReceiver);
         }
     }
 }
 

I've made this game in Unity v4.3.2 and there this script has worked corectly, but after I've made update to Unity v5.0.0, this script gave me this error "CS0234". I've tried different methods writing this script, but I haven't found the corect once yet.

Can someone help me fix this error?

Comment
Add comment · Show 1
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 Dave-Carlile · Jun 27, 2015 at 11:17 PM 0
Share

There's a TouchScript forum link listed in the asset store. You might try asking over there - possibly they have a new version for Unity 5?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Orchanious · Apr 17, 2017 at 01:53 PM

try using TouchScript.GetComponent<>(TouchScript).Events.GestureStateChangeEventArgs e;

Comment
Add comment · Show 1 · 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 Landern · Apr 17, 2017 at 02:01 PM 0
Share

You can't call that as a type of parameter/argument in a method signature. I think the OP was trying to fully qualify the namespace of the type.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Placing a Rect and detecting a Touch/Tap 1 Answer

How to move rigidbody a certain distance, rather than constantly 1 Answer

follow touch input whist falling 0 Answers

How to make 3 bullets fire at different angles 1 Answer

prefabs inside content area not fitting entire width of content area? 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