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 Xdy · Apr 11, 2013 at 09:05 AM · bce0019

BCE0019: 'enabled' is not a member of 'Object'.

function PauseGame() {

 savedTimeScale = Time.timeScale;

 Time.timeScale = 0;

 AudioListener.pause = true;

 if (pauseFilter) pauseFilter.enabled = true;

 currentPage = Page.Main;
 
 transform.position = new Vector3(0, 1, 0);
 Screen.lockCursor = false;

}

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

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Loius · Apr 11, 2013 at 09:16 AM

you're right. it's not.

put #pragma strict back in at the top of the script and fix the errors which that reveals. lazy-typing causes problems if you don't know what's what.

Comment
Add comment · Show 2 · 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 Xdy · Apr 11, 2013 at 09:53 AM 0
Share

After putting #pragma strict the error is same as above and here I provided the top part of the script:

 #pragma strict
  
 var skin:GUISkin;
 private var gldepth = -0.5;
 private var startTime = 0.1;
 var nativeVerticalResolution = 1200.0;
 var scaledResolutionWidth = nativeVerticalResolution / Screen.height * Screen.width;
 var mat:$$anonymous$$aterial;
 private var tris = 0;
 private var verts = 0;
 private var savedTimeScale:float;
 private var pauseFilter;
 private var showfps:boolean;
 private var showtris:boolean;
 private var showvtx:boolean;
 private var showfpsgraph:boolean;
 var lowFPSColor = Color.red;
 var highFPSColor = Color.green;
 var lowFPS = 30;
 var highFPS = 50;
 //var start : GameObject;
 var url = "WebPlayer.html";
 var statColor:Color = Color.yellow;
 var GuiColor:Color = Color.white;
avatar image Loius · Apr 11, 2013 at 10:08 AM 0
Share

pauseFilter has no type and no initialization, so it is Object. give your variables type.

private var pauseFilter : AClassIJust$$anonymous$$adeUp;

avatar image
0

Answer by HmoudMO · Apr 11, 2013 at 10:38 AM

True, its not a member of Object, its basically a member of GameObject. I cannot see a clear code of what pauseFilter is, you can try casting "as GameObject", but that might not work depending on the case, share the full code with us, that would let us help you more.

Comment
Add comment · Show 2 · 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 whydoidoit · Apr 11, 2013 at 10:39 AM 0
Share

enabled is not a member of GameObject - it is a member of anything derived from Behaviour.

avatar image Xdy · Apr 11, 2013 at 11:21 AM 0
Share

This script can be used by everyone as long as credits intach there

http://forum.unity3d.com/threads/177902-BCE0019-enabled-is-not-a-member-of-Object?p=1216682#post1216682

The answer is type casting it which im trying

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

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

rigidbody' is not a member of 'UnityEngine.Object 1 Answer

Script AI.js, Unity ISO dynamic Scripting 0 Answers

gameObject not a member of UnityEngine.RaycastHit?? 1 Answer

Referencing external static variable with no success 2 Answers

BCE0019: component is not a member of 'Object' 2 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