浏览代码

Mention 3.1.1+ APIs in new optimization tutorials

Rémi Verschelde 6 年之前
父节点
当前提交
a6446ccf49
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4 0
      tutorials/optimization/using_multimesh.rst
  2. 4 0
      tutorials/optimization/using_servers.rst

+ 4 - 0
tutorials/optimization/using_multimesh.rst

@@ -44,6 +44,9 @@ controlled with the :ref:`MultiMesh.visible_instance_count <class_MultiMesh_prop
 property. The typical workflow is to allocate the maximum amount of instances that will be used,
 property. The typical workflow is to allocate the maximum amount of instances that will be used,
 then change the amount visible depending on how many are currently needed.
 then change the amount visible depending on how many are currently needed.
 
 
+.. note:: The :ref:`MultiMesh.visible_instance_count <class_MultiMesh_property_visible_instance_count>`
+          property was first added in Godot 3.1.1-stable.
+
 Multimesh example
 Multimesh example
 -----------------
 -----------------
 
 
@@ -65,6 +68,7 @@ efficient for millions of objects, but for a few thousands, GDScript should be f
         # Then resize (otherwise, changing the format is not allowed).
         # Then resize (otherwise, changing the format is not allowed).
         multimesh.instance_count = 10000
         multimesh.instance_count = 10000
         # Maybe not all of them should be visible at first.
         # Maybe not all of them should be visible at first.
+        # Note: Property only available in Godot 3.1.1 or later.
         multimesh.visible_instance_count = 1000
         multimesh.visible_instance_count = 1000
         # Set the transform of the instances.
         # Set the transform of the instances.
         for i in multimesh.visible_instance_count:
         for i in multimesh.visible_instance_count:

+ 4 - 0
tutorials/optimization/using_servers.rst

@@ -75,6 +75,10 @@ For nodes, there are many functions available:
   *instance base* via the :ref:`VisualInstance.get_instance() <class_VisualInstance_method_get_instance>`
   *instance base* via the :ref:`VisualInstance.get_instance() <class_VisualInstance_method_get_instance>`
   and :ref:`VisualInstance.get_base() <class_VisualInstance_method_get_base>` respectively.
   and :ref:`VisualInstance.get_base() <class_VisualInstance_method_get_base>` respectively.
 
 
+.. note:: The :ref:`VisualInstance.get_instance() <class_VisualInstance_method_get_instance>`
+          and :ref:`VisualInstance.get_base() <class_VisualInstance_method_get_base>` methods were first
+          exposed to the scripting API in Godot 3.1.1-stable.
+
 Just explore the nodes and resources you are familiar with and find the functions to obtain the server *RIDs*.
 Just explore the nodes and resources you are familiar with and find the functions to obtain the server *RIDs*.
 
 
 It is not advised to control RIDs from objects that already have a node associated. Instead, server
 It is not advised to control RIDs from objects that already have a node associated. Instead, server