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 /
avatar image
0
Question by aztekgold · May 01, 2017 at 02:41 PM · raycastdestroyraycastingraycasthitdestroygameobject

Working Fine Then Get: No Cameras Rendering after destroying GameObjects

I'm very new Unity and can't seem to find a solution to my problem. Everything works as intended then after a few clicks (between 0 and 10) I get "Display One, No Cameras Rendering"

I am using the simple 1 x 1 3D cubes repeated and have loaded in the FPSController as a character to interact with the world.

I have the start of a very basic 3d voxel world.

Here is my code:

 public var width = 128;
 public var depth = 128;
 public var heightScale = 20;
 public var detailScale = 25.0f;

 public var grassBlock : GameObject;
 public var stoneBlock : GameObject;
 public var snowBlock : GameObject;

  function Start () {
      var seed = Network.time * 10;
       for(var z = 0; z < width; z++){
           for(var x = 0; x < depth; x++){
               var y = Mathf.PerlinNoise((x+seed)/detailScale, (z+seed)/detailScale) * heightScale;
               var blockPos = new Vector3(x,y,z);
            if(y > 15){
             Instantiate(snowBlock, blockPos, Quaternion.identity);
             } else if(y > 5){
             Instantiate(grassBlock, blockPos, Quaternion.identity);
             } else {
             Instantiate(stoneBlock, blockPos, Quaternion.identity);
             }
         }
     }
 }

 function Update () {
     // On mouse click 
     if(Input.GetMouseButtonDown(0)){
      var cam : Transform = Camera.main.transform;
      var ray = new Ray(cam.position, cam.forward);
      var hit : RaycastHit;
      if(Physics.Raycast (ray, hit, 500))
          Destroy(hit.collider.gameObject);
      }
 }
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
1

Answer by Piyush_Pandey · May 02, 2017 at 11:18 AM

"Display One, No Cameras Rendering" comes when there is not a single object which has a camera component attached to it in a scene {there should be atleast one whether in editor or play mode}.

You might be destroying objects along with the camera. Please check for that.

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 aztekgold · May 02, 2017 at 01:00 PM 0
Share

There is a Camera on the FPSController by default. It sometimes allows me to delete multiple blocks before I revive that error, I can't seem to figure it out.

avatar image
0

Answer by Marceta · May 31, 2017 at 12:36 PM

Check my answer on unity forum: https://forum.unity3d.com/threads/no-camera-rendering-message-with-5-4-0p1.425533/#post-2967704

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

Problem With Raycasthit Angle 0 Answers

Playing particle on 1 instance of cloned prefab 0 Answers

Multiple hit detection with Raycasting? 2 Answers

Using Raycast Normal to match surface rotation to instantiated gameobject? EXAMPLE GIF Included 0 Answers

Physics.Raycast doesn't hit anything even though Debug.DrawRay works 1 Answer


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